]> code.ossystems Code Review - openembedded-core.git/commit
less: fix CVE-2014-9488
authorJunling Zheng <zhengjunling@huawei.com>
Fri, 24 Apr 2015 05:58:59 +0000 (13:58 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 15 May 2015 17:12:10 +0000 (18:12 +0100)
commit7195d219f7af2b94dffb87a94077ec98dacdcdb0
treed67615d8352aa216de6cf90760e2d68a076da01e
parenta42af2e434c01c04af36d6ed7a7a5480a7a255a5
less: fix CVE-2014-9488

An out of bounds read access in the UTF-8 decoding can be triggered with
a malformed file in the tool less. The access happens in the function
is_utf8_well_formed due to a truncated multibyte character in the sample
file.

The bug does not crash less, it can only be made visible by running less
with valgrind or compiling it with Address Sanitizer.

Version 475 of less contains a fix for this issue. The file version.c
contains some entry mentioning this issue (without any credit):

 - v475 3/2/15 Fix possible buffer overrun with invalid UTF-8

The fix is in the file line.c. We derive this patch from:

https://blog.fuzzing-project.org/3-less-out-of-bounds-read-access-TFPA-0022014.html

Thank Claire Robinson for validating it on Mageia 4 i586. Refer to:

https://bugs.mageia.org/show_bug.cgi?id=15567

(From OE-Core master rev: 68994284f3c059b737bfc5afc2600ebd09bdf47f)

Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/less/less/0001-Fix-possible-buffer-overrun-with-invalid-UTF-8.patch [new file with mode: 0644]
meta/recipes-extended/less/less_471.bb