diff options
| author | Mathieu Desnoyers <[email protected]> | 2011-08-25 02:45:03 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2011-08-25 02:45:03 +0000 |
| commit | bc909d9ddbf7778371e36a651d6e4194b1cc7d4c (patch) | |
| tree | 45fb13261b012c61a64713ee13f5c7fe60a046dd /lib/debugobjects.c | |
| parent | ibmveth: Fix leak when recycling skb and hypervisor returns error (diff) | |
| download | kernel-bc909d9ddbf7778371e36a651d6e4194b1cc7d4c.tar.gz kernel-bc909d9ddbf7778371e36a651d6e4194b1cc7d4c.zip | |
sendmmsg/sendmsg: fix unsafe user pointer access
Dereferencing a user pointer directly from kernel-space without going
through the copy_from_user family of functions is a bad idea. Two of
such usages can be found in the sendmsg code path called from sendmmsg,
added by
commit c71d8ebe7a4496fb7231151cb70a6baa0cb56f9a upstream.
commit 5b47b8038f183b44d2d8ff1c7d11a5c1be706b34 in the 3.0-stable tree.
Usages are performed through memcmp() and memcpy() directly. Fix those
by using the already copied msg_sys structure instead of the __user *msg
structure. Note that msg_sys can be set to NULL by verify_compat_iovec()
or verify_iovec(), which requires additional NULL pointer checks.
Signed-off-by: Mathieu Desnoyers <[email protected]>
Signed-off-by: David Goulet <[email protected]>
CC: Tetsuo Handa <[email protected]>
CC: Anton Blanchard <[email protected]>
CC: David S. Miller <[email protected]>
CC: stable <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions
