aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_timer.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2007-02-21 01:20:05 +0100
committerAdrian Bunk <bunk@stusta.de>2007-02-21 01:20:05 +0100
commita0cd22f8e3a0cd4f6d8b08103629cbbc29a0c9fb (patch)
tree6af0e30e52857db7df8da35c290f12754b8b834c /net/lapb/lapb_timer.c
parente48d2dd437e8f5c1fd4ae7ef8c77142e58491151 (diff)
Keys: Fix key serial number collision handling (CVE-2007-0006)
Fix the key serial number collision avoidance code in key_alloc_serial(). This didn't use to be so much of a problem as the key serial numbers were allocated from a simple incremental counter, and it would have to go through two billion keys before it could possibly encounter a collision. However, n that random numbers are used instead, collisions are much more likely. This is fixed by finding a hole in the rbtree where the next unused serial number ought to be and using that by going almost back to the top of the insertion routine and redoing the insertion with the new serial number rathe than trying to be clever and attempting to work out the insertion point pointer directly. This fixes kernel Bugzilla #7727. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions