Eric Biggers fe10e398e8 reiserfs: fix buffer overflow with long warning messages
ReiserFS prepares log messages into a 1024-byte buffer with no bounds
checks.  Long messages, such as the "unknown mount option" warning when
userspace passes a crafted mount options string, overflow this buffer.
This causes KASAN to report a global-out-of-bounds write.

Fix it by truncating messages to the buffer size.

Link: http://lkml.kernel.org/r/20180707203621.30922-1-ebiggers3@gmail.com
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-by: syzbot+b890b3335a4d8c608963@syzkaller.appspotmail.com
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-07-14 11:11:10 -07:00
..
2018-06-12 16:19:22 -07:00
2018-07-01 12:38:16 -07:00
2018-06-11 10:16:13 -07:00
2018-03-14 13:31:23 +01:00
2018-06-15 07:55:24 +09:00
2018-03-27 13:18:09 -04:00
2018-05-22 14:27:52 -04:00
2018-06-22 06:21:34 +09:00
2018-05-22 14:27:52 -04:00
2018-05-21 14:30:09 -04:00
2018-05-22 14:27:53 -04:00
2018-06-15 18:11:26 -03:00
2018-06-07 17:34:40 -07:00
2018-06-05 19:23:26 +02:00
2018-06-08 17:21:52 -07:00
2018-06-07 17:34:35 -07:00
2017-12-07 14:23:30 -05:00
2018-05-03 16:11:37 -06:00
2018-06-12 15:49:00 -07:00
2018-06-11 08:22:34 -07:00
2018-02-15 15:34:42 -05:00
2018-04-04 12:44:02 -07:00