bugPSPP - Bugs: bug #58599, Heap overflow in write in...

 
 

bug #58599: Heap overflow in write in fill_covariance

Submitter:  Andrea Fioraldi <andreafioraldi>
Submitted:  Wed 17 Jun 2020 08:49:33 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
   

Wed 17 Jun 2020 08:49:33 AM UTC, original submission:  

This bug seems critical, a write of 8 bytes OOB in heap is likely exploitable on ptmalloc.

./pspp -O format=txt -o /dev/null -b heap_2


=================================================================
==121728==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200005c098 at pc 0x00000070327a bp 0x7fffffffdad0 sp 0x7fffffffdac8
WRITE of size 8 at 0x60200005c098 thread T0
    #0 0x703279 in fill_covariance /home/andreaf/real/pspp/src/language/stats/regression.c:629:25
    #1 0x703279 in run_regression_get_models /home/andreaf/real/pspp/src/language/stats/regression.c:737:23
    #2 0x6efe48 in run_regression /home/andreaf/real/pspp/src/language/stats/regression.c:800:28
    #3 0x6efe48 in cmd_regression /home/andreaf/real/pspp/src/language/stats/regression.c:434:2
    #4 0x4d048b in do_parse_command /home/andreaf/real/pspp/src/language/command.c:233:16
    #5 0x4d048b in cmd_parse_in_state /home/andreaf/real/pspp/src/language/command.c:148:12
    #6 0x4c9df6 in main /home/andreaf/real/pspp/src/ui/terminal/main.c:138:20
    #7 0x7ffff61a5b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
    #8 0x421499 in _start (/home/andreaf/real/pspp/pspp_afl+0x421499)

0x60200005c098 is located 0 bytes to the right of 8-byte region [0x60200005c090,0x60200005c098)
allocated by thread T0 here:
    #0 0x499bdd in malloc (/home/andreaf/real/pspp/pspp_afl+0x499bdd)
    #1 0xc82d58 in xmalloc /home/andreaf/real/pspp/gl/xmalloc.c:41:13
    #2 0x6efe48 in run_regression /home/andreaf/real/pspp/src/language/stats/regression.c:800:28
    #3 0x6efe48 in cmd_regression /home/andreaf/real/pspp/src/language/stats/regression.c:434:2
    #4 0x4d048b in do_parse_command /home/andreaf/real/pspp/src/language/command.c:233:16
    #5 0x4d048b in cmd_parse_in_state /home/andreaf/real/pspp/src/language/command.c:148:12
    #6 0x4c9df6 in main /home/andreaf/real/pspp/src/ui/terminal/main.c:138:20
    #7 0x7ffff61a5b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

SUMMARY: AddressSanitizer: heap-buffer-overflow /home/andreaf/real/pspp/src/language/stats/regression.c:629:25 in fill_covariance
Shadow bytes around the buggy address:
  0x0c04800037c0: fa fa 03 fa fa fa 00 fa fa fa 01 fa fa fa 00 00
  0x0c04800037d0: fa fa 00 fa fa fa 00 fa fa fa 00 00 fa fa 00 fa
  0x0c04800037e0: fa fa fd fa fa fa 00 fa fa fa 00 00 fa fa 00 00
  0x0c04800037f0: fa fa fd fa fa fa fd fa fa fa 00 00 fa fa fd fa
  0x0c0480003800: fa fa fd fa fa fa 00 00 fa fa 00 fa fa fa 00 fa
=>0x0c0480003810: fa fa 00[fa]fa fa 00 00 fa fa 00 fa fa fa 00 00
  0x0c0480003820: fa fa 00 fa fa fa 00 00 fa fa 00 fa fa fa 01 fa
  0x0c0480003830: fa fa fd fa fa fa fd fa fa fa fd fa fa fa 00 00
  0x0c0480003840: fa fa 00 fa fa fa fd fa fa fa fd fa fa fa fd fd
  0x0c0480003850: fa fa 00 00 fa fa 00 fa fa fa 00 fa fa fa fd fa
  0x0c0480003860: fa fa fd fd fa fa fd fd fa fa fd fa fa fa fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==121728==ABORTING


Andrea Fioraldi <andreafioraldi>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #49294:  heap_2 added by andreafioraldi (2KiB - 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 jmd (Updated the item)
  • -email is unavailable- added by andreafioraldi (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
    2020-06-20 jmd StatusNone Fixed
        Open/ClosedOpen Closed
    2020-06-17 andreafioraldi Attached File- Added heap_2, #49294

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code