Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OOB read bug found via Strnew_size at Str.c. #284

Open
TimChan2001 opened this issue Nov 17, 2023 · 1 comment
Open

OOB read bug found via Strnew_size at Str.c. #284

TimChan2001 opened this issue Nov 17, 2023 · 1 comment

Comments

@TimChan2001
Copy link

Hi, we found an OOB read bug via Strnew_size at Str.c.

Reproduction

Build w3m with ASAN, then run

./w3m -dump $POC

We ran it on a 64-bit Ubuntu 20.04, and it also worked on Ubuntu 18.04.

ASAN Report

The POC can be found here. POC

AddressSanitizer:DEADLYSIGNAL
=================================================================
==24017==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f325c6c57b3 bp 0x000000000000 sp 0x7ffd23364ce0 T0)
==24017==The signal is caused by a READ memory access.
==24017==Hint: address points to the zero page.
    #0 0x7f325c6c57b2 in GC_malloc_kind (/lib/x86_64-linux-gnu/libgc.so.1+0x227b2)
    #1 0x56376586faf4 in Strnew_size /home/cyy/w3m/Str.c:61
    #2 0x5637658813bb in wc_conv_to_ces /home/cyy/w3m/libwc/conv.c:70
    #3 0x563765880b70 in wc_Str_conv /home/cyy/w3m/libwc/conv.c:23
    #4 0x56376578bd5e in _saveBuffer /home/cyy/w3m/file.c:7875
    #5 0x56376578c0e3 in saveBuffer /home/cyy/w3m/file.c:7893
    #6 0x5637657146cf in do_dump /home/cyy/w3m/main.c:1409
    #7 0x563765712baf in main /home/cyy/w3m/main.c:1115
    #8 0x7f325c4a5082 in __libc_start_main ../csu/libc-start.c:308
    #9 0x56376570d78d in _start (/home/cyy/w3m/w3m+0xae78d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libgc.so.1+0x227b2) in GC_malloc_kind
==24017==ABORTING
@rkta
Copy link
Contributor

rkta commented Nov 17, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants