aboutsummaryrefslogtreecommitdiff
path: root/scripts/patch-kernel
diff options
context:
space:
mode:
authorDon Mullis <[email protected]>2010-09-30 15:15:32 -0700
committerLinus Torvalds <[email protected]>2010-10-01 10:50:58 -0700
commitf015ac3edd84ad72f88e08a4d83c56c360aae404 (patch)
tree87f88c4e502d69752776dd36451d0ece5416f9f1 /scripts/patch-kernel
parent982f7c2b2e6a28f8f266e075d92e19c0dd4c6e56 (diff)
lib/list_sort: do not pass bad pointers to cmp callback
If the original list is a POT in length, the first callback from line 73 will pass a==b both pointing to the original list_head. This is dangerous because the 'list_sort()' user can use 'container_of()' and accesses the "containing" object, which does not necessary exist for the list head. So the user can access RAM which does not belong to him. If this is a write access, we can end up with memory corruption. Signed-off-by: Don Mullis <[email protected]> Tested-by: Artem Bityutskiy <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions