Felix Fietkau
3848e6a246
kernel: crashlog: Avoid out-of-bounds write
...
vsnprintf returns the number of chars that would have been written, not
the actual number of chars written. This can lead to crashlog_buf->len
being too big which in turn can lead to get_maxlen() returning negative
numbers. The length argument of kmsg_dump_get_buffer will be casted to
a size_t which makes a negative input a big positive number allowing
kmsg_dump_get_buffer to write out of bounds.
Fix this by using vscnprintf which returns the actually written number
of chars.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
SVN-Revision: 37820
2013-08-21 20:59:25 +00:00
..
2013-03-14 14:45:56 +00:00
2013-07-19 12:02:34 +00:00
2013-07-19 12:02:34 +00:00
2013-08-05 16:17:05 +00:00
2013-04-30 10:44:08 +00:00
2013-04-30 10:44:08 +00:00
2013-03-25 13:53:48 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-04-15 16:10:01 +00:00
2013-06-22 14:00:12 +00:00
2013-03-25 13:53:48 +00:00
2013-03-14 14:45:56 +00:00
2013-07-15 15:12:33 +00:00
2013-03-14 14:45:56 +00:00
2013-07-29 09:38:29 +00:00
2013-03-14 14:45:56 +00:00
2013-03-25 13:53:48 +00:00
2013-07-13 22:43:10 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-06-30 13:10:12 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-19 14:13:39 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-04-15 16:10:01 +00:00
2013-07-13 22:43:10 +00:00
2013-03-14 14:45:56 +00:00
2013-05-09 20:50:07 +00:00
2013-04-09 16:16:20 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-04-28 17:01:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-04-15 16:10:01 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-25 13:53:48 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-04-09 16:16:20 +00:00
2013-03-14 14:45:56 +00:00
2013-04-09 16:16:20 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-17 19:46:32 +00:00
2013-07-13 22:43:10 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-07-21 13:53:54 +00:00
2013-06-30 13:10:12 +00:00
2013-03-25 13:53:48 +00:00
2013-03-14 14:45:56 +00:00
2013-04-28 11:55:23 +00:00
2013-06-30 13:10:12 +00:00
2013-07-22 15:30:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-25 13:53:48 +00:00
2013-04-10 13:11:16 +00:00
2013-04-15 16:10:01 +00:00
2013-04-10 13:11:21 +00:00
2013-04-10 13:11:25 +00:00
2013-04-15 20:40:29 +00:00
2013-04-10 13:11:29 +00:00
2013-06-30 13:10:12 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-17 19:46:32 +00:00
2013-03-17 19:46:32 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-04-28 11:55:23 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-06-30 13:10:12 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-05-20 16:57:00 +00:00
2013-05-20 16:57:00 +00:00
2013-03-14 14:45:56 +00:00
2013-04-09 16:16:20 +00:00
2013-07-27 09:23:18 +00:00
2013-07-27 09:23:18 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-07-09 12:52:00 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-06-30 13:10:12 +00:00
2013-03-17 19:46:32 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-04-09 16:16:20 +00:00
2013-08-21 20:59:25 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-04-15 16:10:01 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-03-17 19:46:32 +00:00
2013-03-14 14:45:56 +00:00
2013-03-14 14:45:56 +00:00
2013-04-15 16:10:01 +00:00
2013-05-09 19:19:36 +00:00
2013-05-30 16:00:42 +00:00