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

null pointer dereference in HTMLlineproc2body #32

Closed
kcwu opened this issue Nov 6, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@kcwu
Copy link
Contributor

commented Nov 6, 2016

input

00000000: 3c74 6162 6c65 3e3c 623c 3e00 3c6c 6973  <table><b<>.<lis
00000010: 7469 6e67 3e3c 7365 6c65 6374 5f69 6e74  ting><select_int
00000020: 2073 656c 6563 746e 756d 6265 723d 303e   selectnumber=0>
00000030: 3c2f 7365 6c65 6374 5f69 6e74 3e         </select_int>

gdb log

$ gdb --args w3m -T text/html -dump file
Program received signal SIGSEGV, Segmentation fault.
0x000000000042a5c4 in HTMLlineproc2body (buf=0x774740, feed=0x42817d <textlist_feed>, llimit=-1) at file.c:6061
6061                                (FormItemList *)a_select[n_select]->url;
(gdb) p a_select
$1 = (Anchor **) 0x0
(gdb) p n_select
$2 = 0
(gdb) bt
#0  0x000000000042a5c4 in HTMLlineproc2body (buf=0x774740, feed=0x42817d <textlist_feed>, llimit=-1) at file.c:6061
#1  0x000000000042adb0 in HTMLlineproc2 (buf=0x774740, tl=0x774c00) at file.c:6191
#2  0x000000000042dfb2 in loadHTMLstream (f=0x7fffffffcb00, newBuf=0x774740, src=0x0, internal=0) at file.c:7276
#3  0x000000000042c7db in loadHTMLBuffer (f=0x7fffffffcb00, newBuf=0x774740) at file.c:6773
#4  0x0000000000416951 in loadSomething (f=0x7fffffffcb00, loadproc=0x42c6c1 <loadHTMLBuffer>, defaultbuf=0x774740) at file.c:224
#5  0x000000000041c7c3 in loadGeneralFile (path=0x772130 "min/1", current=0x0, referer=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>, flag=0,
    request=0x0) at file.c:2241
#6  0x0000000000406fe2 in main (argc=5, argv=0x7fffffffce28, envp=0x7fffffffce58) at main.c:1020

This is found by afl-fuzz.

tats added a commit that referenced this issue Nov 7, 2016

@tats

This comment has been minimized.

Copy link
Owner

commented Nov 7, 2016

Fixed, thank you.

@tats tats closed this Nov 7, 2016

@kcwu

This comment has been minimized.

Copy link
Contributor Author

commented Nov 13, 2016

Similar case for textarea_int

00000000: 3c74 6162 6c65 3e3c 623c 3e00 3c6c 6973  <table><b<>.<lis
00000010: 7469 6e67 3e3c 7465 7874 6172 6561 5f69  ting><textarea_i
00000020: 6e74 2074 6578 7461 7265 616e 756d 6265  nt textareanumbe
00000030: 723d 303e 3c2f 7465 7874 6172 6561 5f69  r=0></textarea_i
00000040: 6e74 3e                                  nt>
@tats

This comment has been minimized.

Copy link
Owner

commented Nov 13, 2016

Similar case for textarea_int

Fixed, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.