Bug 29999 - perl-Image-ExifTool new security issue CVE-2022-23935
Summary: perl-Image-ExifTool new security issue CVE-2022-23935
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Security (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact: Sec team
URL:
Whiteboard: MGA8-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2022-02-04 16:20 CET by David Walser
Modified: 2022-10-24 00:49 CEST (History)
6 users (show)

See Also:
Source RPM: perl-Image-ExifTool-12.0.0-1.1.mga8.src.rpm
CVE: CVE-2022-23935
Status comment:


Attachments

Description David Walser 2022-02-04 16:20:06 CET
Fedora has issued an advisory today (February 4):
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/thread/BKMOJHTMTSAYV7B2A27CBMM7IBAZIRWE/

The issue is fixed upstream in 12.38.

Mageia 8 is also affected.
David Walser 2022-02-04 16:20:17 CET

Whiteboard: (none) => MGA8TOO

David Walser 2022-02-04 16:20:39 CET

Status comment: (none) => Fixed upstream in 12.38

Comment 1 Lewis Smith 2022-02-04 21:28:03 CET
Assigning to tv since you have dealt with this often in the past.

Assignee: bugsquad => thierry.vignaud

Comment 2 Nicolas Lécureuil 2022-02-08 13:31:46 CET
there is no 12.38 official for now.
Maybe better to use the commit as patch

CC: (none) => mageia

Comment 3 David Walser 2022-02-08 15:44:17 CET
That would be fine.
Comment 4 Nicolas Salguero 2022-10-20 12:17:47 CEST
Suggested advisory:
========================

The updated package fixes a security vulnerability:

lib/Image/ExifTool.pm in ExifTool before 12.38 mishandles a $file =~ /\|$/ check, leading to command injection. (CVE-2022-23935)

References:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-23935
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/thread/BKMOJHTMTSAYV7B2A27CBMM7IBAZIRWE/
========================

Updated package in core/updates_testing:
========================
perl-Image-ExifTool-12.0.0-1.2.mga8

from SRPM:
perl-Image-ExifTool-12.0.0-1.2.mga8.src.rpm

Status: NEW => ASSIGNED
Assignee: thierry.vignaud => qa-bugs
Version: Cauldron => 8
Status comment: Fixed upstream in 12.38 => (none)
Whiteboard: MGA8TOO => (none)
CC: (none) => nicolas.salguero
CVE: (none) => CVE-2022-23935
Source RPM: perl-Image-ExifTool-12.300.0-2.mga9.src.rpm => perl-Image-ExifTool-12.0.0-1.1.mga8.src.rpm

Comment 5 Len Lawrence 2022-10-22 22:24:34 CEST
CVE-2022-23935
https://gist.github.com/ert-plus/1414276e4cb5d56dd431c2f0429e4429
Before:
$ touch 'touch pwn |'
$ exiftool 'touch pwn |'
ExifTool Version Number         : 12.00
File Name                       : touch pwn |
Directory                       : .
Error                           : File is empty
$ ls pwn
pwn

Afterwards:
$ rm -f pwn
$ 'touch pwn |'
$ ls pwn
ls: cannot access 'pwn': No such file or directory
$ exiftool 'touch pwn |'
ExifTool Version Number         : 12.00
File Name                       : touch pwn |
Directory                       : .
File Size                       : 0 bytes
File Modification Date/Time     : 2022:10:22 20:18:37+01:00
File Access Date/Time           : 2022:10:22 20:18:37+01:00
File Inode Change Date/Time     : 2022:10:22 20:18:37+01:00
File Permissions                : rw-r--r--
Error                           : File is empty
$ ls pwn
ls: cannot access 'pwn': No such file or directory

This shows that any command injection via the pipe is prevented.

exiftool works with most image formats.
$ exiftool surfacefly_spirit.swf
ExifTool Version Number         : 12.00
File Name                       : surfacefly_spirit.swf
Directory                       : .
File Size                       : 19 MB
[...]
MIME Type                       : application/x-shockwave-flash
Flash Version                   : 6
Compressed                      : True
....
$ exiftool screenshot.tif
ExifTool Version Number         : 12.00
[...]
Planar Configuration            : Chunky
Page Number                     : 0 1
Software                        : GraphicsMagick 1.3.30 2018-06-23 Q8 http://www.GraphicsMagick.org/
[...]
Megapixels                      : 8.3

Tried different files by extension; JPM, PGM, BMP, MIFF, TIFF, PPM, RAF (screeds of data), EPS/PS, JPG, JP2,
SVG, XML(XMP), PNG, GIF, but GD/GD2, targa and PGX were marked as unknown file type and WMF as unsupported.  file reports GD/GD2 files as data so they are probably sets of drawing instructions.    
It even returned a polite answer for a hexdump.
The extension is effectively ignored, as expected.

This all looks OK.

Whiteboard: (none) => MGA8-64-OK
CC: (none) => tarazed25

Comment 6 Thomas Andrews 2022-10-23 01:22:10 CEST
Validating. Advisory in Comment 4.

CC: (none) => andrewsfarm, sysadmin-bugs
Keywords: (none) => validated_update

Dave Hodgins 2022-10-23 23:37:40 CEST

Keywords: (none) => advisory
CC: (none) => davidwhodgins

Comment 7 Mageia Robot 2022-10-24 00:49:41 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGASA-2022-0381.html

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED


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