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
..
2012-12-22 12:11:06 +00:00
2012-12-22 12:11:06 +00:00
2012-12-22 12:11:06 +00:00
2012-12-22 12:11:06 +00:00
2013-02-01 17:30:15 +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
2012-10-31 20:09:39 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 15:57:31 +00:00
2012-11-13 20:57:13 +00:00
2012-12-12 08:37:27 +00:00
2012-12-14 08:47:39 +00:00
2012-12-14 08:47:39 +00:00
2013-05-12 10:55:12 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-12-02 13:04:04 +00:00
2012-12-20 17:14:57 +00:00
2012-10-24 13:05:22 +00:00
2013-07-29 09:38:29 +00:00
2012-10-24 13:05:22 +00:00
2012-12-02 15:26:19 +00:00
2012-10-24 13:05:22 +00:00
2012-11-04 17:01:15 +00:00
2012-12-02 17:42:17 +00:00
2012-10-24 13:05:22 +00:00
2013-03-19 14:13:39 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2013-05-09 20:50:07 +00:00
2012-11-19 12:38:26 +00:00
2013-03-17 19:45:48 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-12-28 19:17:19 +00:00
2012-10-24 13:05:22 +00:00
2012-12-28 19:17:19 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2013-01-29 09:44:58 +00:00
2013-01-29 09:44:58 +00:00
2013-01-29 09:44:58 +00:00
2013-01-29 09:44:58 +00:00
2012-11-29 07:42:19 +00:00
2012-11-06 00:48:21 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2013-02-01 17:30:15 +00:00
2013-02-01 17:30:15 +00:00
2013-04-28 11:10:42 +00:00
2012-10-24 13:05:22 +00:00
2013-04-28 11:10:42 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-30 21:16:21 +00:00
2012-10-30 21:16:23 +00:00
2012-10-30 21:16:24 +00:00
2012-10-31 15:12:45 +00:00
2012-10-31 15:12:45 +00:00
2012-10-31 19:33:12 +00:00
2012-10-31 19:33:12 +00:00
2012-10-31 19:33:12 +00:00
2012-10-31 21:17:30 +00:00
2012-11-01 11:07:23 +00:00
2012-11-01 11:07:23 +00:00
2012-11-01 11:07:23 +00:00
2012-11-20 17:45:24 +00:00
2012-11-20 17:45:24 +00:00
2012-11-20 17:45:24 +00:00
2012-11-01 11:07:16 +00:00
2012-11-01 11:07:16 +00:00
2012-11-01 11:07:16 +00:00
2012-10-24 13:05:22 +00:00
2013-01-02 08:53:07 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2013-02-01 17:30:15 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-27 15:42:25 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-28 18:59:39 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-11-18 08:41:31 +00:00
2012-10-28 18:59:39 +00:00
2012-12-14 12:11:48 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2013-02-07 15:18:24 +00:00
2013-02-07 15:18:24 +00:00
2012-10-24 13:05:22 +00:00
2013-04-22 15:01:36 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2013-01-23 10:12:33 +00:00
2012-10-24 13:05:22 +00:00
2013-01-17 13:54:14 +00:00
2013-01-17 13:54:14 +00:00
2012-12-03 10:33:47 +00:00
2012-12-14 08:32:56 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2013-07-27 09:23:18 +00:00
2013-07-27 09:23:18 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-12-18 14:41:16 +00:00
2013-05-02 15:59:57 +00:00
2012-12-17 20:55:49 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-31 20:09:39 +00:00
2012-10-31 20:09:39 +00:00
2013-08-21 20:59:25 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2013-04-28 11:10:42 +00:00
2012-11-09 09:07:29 +00:00
2012-11-11 21:04:30 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2012-10-24 13:05:22 +00:00
2013-04-09 15:47:01 +00:00
2013-04-09 15:47:01 +00:00