Felix Fietkau
edc8daeffe
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 >
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37820 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-08-21 20:59:25 +00:00
..
2013-07-29 22:42:22 +00:00
2013-07-20 10:14:05 +00:00
2013-07-22 15:31:13 +00:00
2013-07-29 22:42:22 +00:00
2013-08-05 16:17:05 +00:00
2013-07-20 18:35:54 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-01 13:21:06 +00:00
2013-05-19 18:36:15 +00:00
2013-07-15 15:12:33 +00:00
2013-08-15 09:23:07 +00:00
2013-08-15 09:29:53 +00:00
2013-08-18 05:49:57 +00:00
2013-05-19 18:36:15 +00:00
2013-07-29 09:38:29 +00:00
2013-05-19 18:36:15 +00:00
2013-07-01 13:21:06 +00:00
2013-07-29 22:42:22 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-01 13:21:06 +00:00
2013-05-19 18:36:15 +00:00
2013-07-29 22:42:22 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-01 13:21:06 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-08-12 17:26:08 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-22 16:02:12 +00:00
2013-08-04 13:54:42 +00:00
2013-07-29 22:42:22 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-14 12:57:03 +00:00
2013-07-15 15:12:37 +00:00
2013-07-15 15:12:37 +00:00
2013-05-19 18:36:15 +00:00
2013-07-15 15:12:37 +00:00
2013-05-19 18:36:15 +00:00
2013-07-15 11:01:48 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-08-17 23:54:41 +00:00
2013-05-19 18:36:15 +00:00
2013-07-29 22:42:22 +00:00
2013-07-15 15:12:37 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-29 22:42:22 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-29 22:42:22 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-29 22:42:22 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-29 22:42:22 +00:00
2013-05-19 18:36:15 +00:00
2013-07-01 13:21:06 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-29 22:42:22 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-29 22:42:22 +00:00
2013-07-29 22:42:22 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-21 13:53:54 +00:00
2013-07-01 13:21:06 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-29 22:42:22 +00:00
2013-07-15 15:12:37 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-29 22:42:22 +00:00
2013-07-01 13:21:06 +00:00
2013-07-01 13:21:06 +00:00
2013-07-29 22:42:22 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-29 22:42:22 +00:00
2013-07-01 13:21:06 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-01 13:21:06 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-15 21:05:53 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-29 22:42:22 +00:00
2013-07-29 22:42:22 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-29 01:27:27 +00:00
2013-05-29 01:27:27 +00:00
2013-05-19 18:36:15 +00:00
2013-07-15 21:05:53 +00:00
2013-07-27 09:23:18 +00:00
2013-07-27 09:23:18 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-09 12:52:00 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-29 22:42:22 +00:00
2013-07-01 13:21:06 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-08-21 20:59:25 +00:00
2013-07-01 13:21:06 +00:00
2013-07-29 22:42:22 +00:00
2013-07-01 13:21:06 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-07-29 22:42:22 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-19 18:36:15 +00:00
2013-05-30 16:00:42 +00:00