Bug 2111538 - Use of uninitialized value when running jhead
Summary: Use of uninitialized value when running jhead
Keywords:
Status: NEW
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: jhead
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Adrian Reber
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-27 13:13 UTC by Ling Jiang
Modified: 2022-07-27 13:13 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
crash inputs (19.99 KB, application/gzip)
2022-07-27 13:13 UTC, Ling Jiang
no flags Details

Description Ling Jiang 2022-07-27 13:13:40 UTC
Created attachment 1899660 [details]
crash inputs

Description of problem:
use-of-uninitialized-value when running jhead with MemorySanitizer.


Version-Release number of selected component (if applicable):
The latest version in https://github.com/Matthias-Wandel/jhead
commit id: 0e98605d0a08bc692b87ca878bb4dc7bdfc12471

How reproducible:
Stable reproduce in the recent versions


Steps to Reproduce:
1. Run jhead with the attached inputs (28 files in total and test with `jhead 0`)

Actual results:
Nonfatal Error : '0' Extraneous 127 padding bytes before section CF
Uninitialized bytes in MemcmpInterceptorCommon at offset 0 inside [0x702000000002, 4)
==50456==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x55b1b9248ede in memcmp (/workspace/jhead/jhead+0x57ede) (BuildId: d722f88b0627b52aea0538b22b185e2befd623fc)
    #1 0x55b1b92ac84d in ReadJpegSections (/workspace/jhead/jhead+0xbb84d) (BuildId: d722f88b0627b52aea0538b22b185e2befd623fc)
    #2 0x55b1b92ae662 in ReadJpegFile (/workspace/jhead/jhead+0xbd662) (BuildId: d722f88b0627b52aea0538b22b185e2befd623fc)
    #3 0x55b1b929e016 in ProcessFile jhead.c
    #4 0x55b1b929c7b7 in main (/workspace/jhead/jhead+0xab7b7) (BuildId: d722f88b0627b52aea0538b22b185e2befd623fc)
    #5 0x7f2cb8de4d8f  (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) (BuildId: 89c3cb85f9e55046776471fed05ec441581d1969)
    #6 0x7f2cb8de4e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) (BuildId: 89c3cb85f9e55046776471fed05ec441581d1969)
    #7 0x55b1b92103b4 in _start (/workspace/jhead/jhead+0x1f3b4) (BuildId: d722f88b0627b52aea0538b22b185e2befd623fc)

SUMMARY: MemorySanitizer: use-of-uninitialized-value (/workspace/jhead/jhead+0x57ede) (BuildId: d722f88b0627b52aea0538b22b185e2befd623fc) in memcmp
Exiting

Expected results:
Not applicable

Additional info:
All the files have diverse execution paths but the same error


Note You need to log in before you can comment on or make changes to this bug.