Created attachment 1767293 [details] poc file to this bug Description of problem: A heap-buffer-overflow problem in netpbm bmptopnm. Version-Release number of selected component (if applicable): svn revision: 4078 How reproducible: First install requirements for netpbm: svn checkout http://svn.code.sf.net/p/netpbm/code/advanced netpbm cd to netpbm, ./configure choose static. Then open config.mk, add "-g and -fsanitize=address" to CFLAGS and "LDFLAGS = -fsanitize=address" to the file. Then make. Steps to Reproduce: [path to the file]/bmptopnm c4 Actual results: ./bin/bmptopnm c4 bmptopnm: Windows (v5) BMP, 1207959553x1x32 bmptopnm: warning: some image data remains unread. bmptopnm: WRITING PPM IMAGE P6 1207959553 1 255 ================================================================= ==922==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000efde at pc 0x000000406635 bp 0x7ffdb6029d40 sp 0x7ffdb6029d30 READ of size 1 at 0x60200000efde thread T0 #0 0x406634 (/usr/local/netpbm_asan/bin/bmptopnm+0x406634) #1 0x7f894d52283f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f) #2 0x406bd8 (/usr/local/netpbm_asan/bin/bmptopnm+0x406bd8) 0x60200000efde is located 2 bytes to the right of 12-byte region [0x60200000efd0,0x60200000efdc) allocated by thread T0 here: #0 0x7f894dc6d602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602) #1 0x402e5d (/usr/local/netpbm_asan/bin/bmptopnm+0x402e5d) SUMMARY: AddressSanitizer: heap-buffer-overflow ??:0 ?? Shadow bytes around the buggy address: 0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9db0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9dc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9dd0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9de0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c047fff9df0: fa fa fa fa fa fa fa fa fa fa 00[04]fa fa 00 04 0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 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 Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 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 ==922==ABORTING Additional info: credit: jimoyong from NSFOCUS Security Team
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle. Changing version to 35.
This message is a reminder that Fedora Linux 35 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '35'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 35 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13. Fedora Linux 35 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed.