aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/seccomp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-08-01 13:34:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-08-01 13:46:52 -0400
commit0083fc2c50e6c5127c2802ad323adf8143ab7856 (patch)
tree0ec735c46d8be4ae4c637243b126feba0be2ebe8 /kernel/seccomp.c
parented680c4ad478d0fee9740f7d029087f181346564 (diff)
do_sigaltstack: avoid copying 'stack_t' as a structure to user space
Ulrich Drepper correctly points out that there is generally padding in the structure on 64-bit hosts, and that copying the structure from kernel to user space can leak information from the kernel stack in those padding bytes. Avoid the whole issue by just copying the three members one by one instead, which also means that the function also can avoid the need for a stack frame. This also happens to match how we copy the new structure from user space, so it all even makes sense. [ The obvious solution of adding a memset() generates horrid code, gcc does really stupid things. ] Reported-by: Ulrich Drepper <drepper@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/seccomp.c')
0 files changed, 0 insertions, 0 deletions