Commit Graph

3 Commits (506cf51b533da43405dd341b29c01bada1211b2b)

Author SHA1 Message Date
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
11 years ago
Jonas Gorski 96f8c15a36 kernel: update linux 3.10 to 3.10 final
3.10 final is out, so refresh patches and add md5sum.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 37116
11 years ago
Jonas Gorski c0435a971e kernel: generic: add 3.10-rc1 support
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 36663
11 years ago