Skip to content

Series to make copy_from_user to a stack slot provable right

Arjan van de Ven linux-wireless lkml netdev 1 version Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 12 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/9Fix bound checks for copy_from_user in the acpi /proc codedrivers/acpi/proc.c+2 -00 replies
2/9Simplify bound checks in nvram for copy_from_userdrivers/char/nvram.c+9 -10 replies
3/9Add bound checks in wext for copy_from_usernet/wireless/wext.c+6 -30 replies
4/9Simplify bound checks in the MTRR codearch/x86/kernel/cpu/mtrr/if.c+12 -51 reply
5/9Add bound checks in acpi/video for copy_from_userdrivers/acpi/video.c+14 -40 replies
6/9Simplify bound checks in cifs for copy_from_userfs/cifs/cifs_debug.c+5 -30 replies
7/9Simplify bound checks in capabilities for copy_from_userkernel/capability.c+6 -33 replies
8/9Add explicit bound checks in mm/migrate.cmm/migrate.c+6 -23 replies
9/9Add explicit bound checks in net/socket.cnet/socket.c+6 -15 replies

Reviews trailers per patch

2 of 9 patches have a Reviewed-by or Acked-by.

PatchJames MorrisKOSAKI Motohiro
1/9
2/9
3/9
4/9
5/9
6/9
7/9A-b
8/9R-b
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/9] Series to make copy_from_user to a stack slot provable right

[PATCH 0/9] Series to make copy_from_user to a stack slot provable right

This series contains a series of patches that, when applied, make every copy_from_user() in a make allyesconfig to a (direct) stack slot provable-by-gcc to have a correct size.

This is useful because if we fix all of these, we can make the non-provable case an error, as an indication of a possible security hole.

Now the series has 4 types of patches
1) changes where the original code really was missing checks
2) changes where the checks were coded so complex and games were played with types, that I (and the compiler) couldn't be sure if it was correct or not
3) changes where we're hitting a small gcc missing optimization, but where a simplification of the code allows gcc to prove things anyway.
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41477 is filed for this)
4) a case in sys_socketcall where Dave Miller and co were very smart in optimizing the code to the point where it's not reasonable for gcc to realize the result is ok.

Signature · 3 lines
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org