aboutsummaryrefslogtreecommitdiff
path: root/scripts/patch-kernel
diff options
context:
space:
mode:
authorDan Rosenberg <[email protected]>2010-09-30 15:15:31 -0700
committerLinus Torvalds <[email protected]>2010-10-01 10:50:58 -0700
commit982f7c2b2e6a28f8f266e075d92e19c0dd4c6e56 (patch)
treea25ab8534b9f43cb90292ed125dfb9d72fee9858 /scripts/patch-kernel
parent64aab720bdf8771214a7c88872bd8e3194c2d279 (diff)
sys_semctl: fix kernel stack leakage
The semctl syscall has several code paths that lead to the leakage of uninitialized kernel stack memory (namely the IPC_INFO, SEM_INFO, IPC_STAT, and SEM_STAT commands) during the use of the older, obsolete version of the semid_ds struct. The copy_semid_to_user() function declares a semid_ds struct on the stack and copies it back to the user without initializing or zeroing the "sem_base", "sem_pending", "sem_pending_last", and "undo" pointers, allowing the leakage of 16 bytes of kernel stack memory. The code is still reachable on 32-bit systems - when calling semctl() newer glibc's automatically OR the IPC command with the IPC_64 flag, but invoking the syscall directly allows users to use the older versions of the struct. Signed-off-by: Dan Rosenberg <[email protected]> Cc: Manfred Spraul <[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