bugPSPP - Bugs: bug #54687, heap buffer overflow in...

 
 

bug #54687: heap buffer overflow in assign_variable_roles

Submitter:  Tianxiao Gu <tianxiaogu>
Submitted:  Wed 19 Sep 2018 04:26:42 AM UTC
   
 
Category:  Syntax Parser Severity:  5 - Average
Status:  Fixed Assigned to:  None
Open/Closed:  Closed Release:  None
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 23 Sep 2018 04:38:28 AM UTC, comment #1: 

Thank you for the bug report!  I fixed the problem, just now, with commit 98f90d5547c9 ("sys-file-reader: Fix null deref on bad $@Role attribute.").

Ben Pfaff <blp>
Group administrator
Wed 19 Sep 2018 04:26:42 AM UTC, original submission:  

A heap buffer overflow is triggered using the attached file (pspp-convert-000000).
This bug affects the binary distributed in Ubuntu 18.04.

Build:
~~~
export CFLAGS="-fsanitize=address -g -O0"
make -Smake # optional for git
./configure
make
~~~

Reproduce:
~~~
pspp-convert pspp-convert-000000 -O csv /dev/null
~~~

Output:
~~~
`pspp-convert-000000' near offset 0x56c: Invalid variable display parameters for variable 7 (FOST2).  Default parameters substituted.
`pspp-convert-000000' near offset 0x8e1: Error parsing attribute value $@Role[1].
ASAN:DEADLYSIGNAL
=================================================================
==21330==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f10879d61b0 bp 0x000000000000 sp 0x7fff01937580 T0)
==21330==The signal is caused by a READ memory access.
==21330==Hint: address points to the zero page.
    #0 0x7f10879d61af  (/lib/x86_64-linux-gnu/libc.so.6+0x451af)
    #1 0x7f10882b08f7  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x428f7)
    #2 0x7f1087e7d137 in assign_variable_roles src/data/sys-file-reader.c:2393
    #3 0x7f1087e73671 in sfm_decode src/data/sys-file-reader.c:853
    #4 0x7f1087dfcb72 in any_reader_decode src/data/any-reader.c:147
    #5 0x7f1087dfccb6 in any_reader_open_and_decode src/data/any-reader.c:172
    #6 0x564c7f61ad5b in main utilities/pspp-convert.c:174
    #7 0x7f10879b2b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #8 0x564c7f61a579 in _start (/home/t/Projects/fuzzing/pspp-1.0.1/utilities/.libs/pspp-convert+0x2579)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libc.so.6+0x451af)
==21330==ABORTING
~~~

Tianxiao Gu <tianxiaogu>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #45046:  pspp-convert-000000 added by tianxiaogu (3KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by blp (Posted a comment)
  • -email is unavailable- added by tianxiaogu (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-09-23 blp StatusNone Fixed
        Open/ClosedOpen Closed
    2018-09-19 tianxiaogu Attached File- Added pspp-convert-000000, #45046

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code