]> git.baikalelectronics.ru Git - kernel.git/commit
sparc: fix ldom_reboot buffer overflow harder
authorKees Cook <keescook@chromium.org>
Wed, 2 Oct 2013 05:13:34 +0000 (22:13 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Oct 2013 00:01:56 +0000 (20:01 -0400)
commitfe2fe8a904b488424ce27389c8bee3fe41b8b6a2
tree08bcf584e90c96224052645497e87c38d3083949
parent11a7efc28577bc36a61c0145c8c88bb5605d5116
sparc: fix ldom_reboot buffer overflow harder

The length argument to strlcpy was still wrong. It could overflow the end of
full_boot_str by 5 bytes. Instead of strcat and strlcpy, just use snprint.

Reported-by: Brad Spengler <spender@grsecurity.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/ds.c