Bug 1850598 (CVE-2020-12865)

Summary: CVE-2020-12865 sane-backends: Heap buffer overflow in esci2_img
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: mike, nphilipp, thibault.north, zdohnal
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sane-backends 1.0.30 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in sane-backends in versions prior to 1.0.30. A heap buffer overflow in the esci2_img function could lead to a remote code execution. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-14 13:27:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1850602, 1850604, 1852465, 1852466, 1852467, 1852468    
Bug Blocks: 1848100    

Description Pedro Sampaio 2020-06-24 14:02:56 UTC
A flaw was found in sane-backends before version 1.0.30. A heap buffer overflow in esci2_img function may lead to remote code execution.

Upstream issue:

https://gitlab.com/sane-project/backends/-/issues/279#issue-9-ghsl-2020-084-buffer-overflow-in-esci2_img

References:

https://gitlab.com/sane-project/backends/-/releases

Comment 1 Pedro Sampaio 2020-06-24 14:03:20 UTC
Created mingw-sane-backends tracking bugs for this issue:

Affects: fedora-all [bug 1850604]


Created sane-backends tracking bugs for this issue:

Affects: fedora-all [bug 1850602]

Comment 9 errata-xmlrpc 2020-07-14 09:13:14 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2020:2902 https://access.redhat.com/errata/RHSA-2020:2902

Comment 10 Product Security DevOps Team 2020-07-14 13:27:54 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2020-12865

Comment 11 errata-xmlrpc 2020-07-16 07:30:18 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.1 Extended Update Support

Via RHSA-2020:2967 https://access.redhat.com/errata/RHSA-2020:2967

Comment 12 errata-xmlrpc 2020-07-21 14:34:22 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.0 Update Services for SAP Solutions

Via RHSA-2020:3045 https://access.redhat.com/errata/RHSA-2020:3045

Comment 13 Eric Christensen 2020-08-10 17:58:36 UTC
Statement:

The vulnerable code is a part of "driver for Epson ESC/I-2 scanners" which was first introduced in sane-backends-1.0.25 (via https://gitlab.com/sane-project/backends/-/commit/d72f4663c0ad6e6f779c15c8baf5f92b675ae19a). Therefore, only versions of sane-backends shipped with Red Hat Enterprise Linux 8 are affected by this flaw.

Comment 14 Eric Christensen 2020-08-10 17:58:38 UTC
Mitigation:

This flaw can be mitigated by limiting network scanner discovery to a trusted subnet via the "net" configuration in the "/etc/sane.d/epsonds.conf" configuration file. Also, automatic network scanner discovery can be turned off by commenting out the line "net autodiscovery" in the same configuration file.