Bug 1679978 - Segmentation fault in iptc.c when running jhead
Summary: Segmentation fault in iptc.c when running jhead
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: jhead
Version: epel7
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Adrian Reber
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-22 11:57 UTC by Jianzhong Liu
Modified: 2019-08-14 01:42 UTC (History)
3 users (show)

Fixed In Version: jhead-3.03-4.fc30 jhead-3.03-4.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-14 01:05:28 UTC


Attachments (Terms of Use)
Input triggering the bug (127 bytes, image/jpeg)
2019-02-22 11:57 UTC, Jianzhong Liu
no flags Details

Description Jianzhong Liu 2019-02-22 11:57:15 UTC
Created attachment 1537439 [details]
Input triggering the bug

Description of problem:
Some inputs may trigger a segmentation fault when running jhead.

Version-Release number of selected component (if applicable):
jhead-3.03

How reproducible:
Stable

Steps to Reproduce:
1. Run jhead with the attached input

Actual results:
Program output:
Header missing JFIF marker
Jfif header too short

Nonfatal Error : 'OOBR_unknown_1_crash' Extraneous 17 padding bytes before section ED

Nonfatal Error : 'OOBR_unknown_1_crash' Extraneous 24 padding bytes before section D5
File name    : OOBR_unknown_1_crash
File size    : 127 bytes
File date    : 2019:02:21 05:45:58
Resolution   : 0 x 0
Color/bw     : Black and white
Jpeg process : Unknown
======= IPTC data: =======
Headline      : "2Q                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
[1]    436 segmentation fault (core dumped)  jhead OOBR_unknown_1_crash"

Crashed at:
Core was generated by `jhead OOBR_unknown_1_crash'.
Program terminated with signal 11, Segmentation fault.
#0  show_IPTC (Data=<optimized out>, itemlen=<optimized out>) at iptc.c:122
122             signature = (*pos << 8) + (*(pos+1));

Backtrace:
#0  show_IPTC (Data=<optimized out>, itemlen=<optimized out>) at iptc.c:122
#1  0x0000000000402bdd in ProcessFile (FileName=0x7ffe9cd77908 "OOBR_unknown_1_crash") at jhead.c:955
#2  0x00000000004017e4 in main (argc=<optimized out>, argv=0x7ffe9cd76c18) at jhead.c:1757`

Expected results:
Not applicable

Additional info:

Comment 1 Leonardo Taccari 2019-07-16 10:07:40 UTC
Hello Jianzhong,
can you please share that with upstream if haven't already?

Thank you!

Comment 2 Ludovic Rousseau 2019-08-02 17:46:26 UTC
For Debian I fixed this bug in https://salsa.debian.org/debian/jhead/commit/a2727e82c2a8c5a51a1a7f2a90380b3a55613878

Comment 3 Fedora Update System 2019-08-05 15:38:23 UTC
FEDORA-2019-17b95fecd3 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-17b95fecd3

Comment 4 Fedora Update System 2019-08-05 15:46:09 UTC
FEDORA-2019-441c2fb0d1 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-441c2fb0d1

Comment 5 Fedora Update System 2019-08-06 01:27:16 UTC
jhead-3.03-4.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-441c2fb0d1

Comment 6 Fedora Update System 2019-08-06 03:49:28 UTC
jhead-3.03-4.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-17b95fecd3

Comment 7 Fedora Update System 2019-08-14 01:05:28 UTC
jhead-3.03-4.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2019-08-14 01:42:06 UTC
jhead-3.03-4.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


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