Bug 1850588 (CVE-2020-12863)

Summary: CVE-2020-12863 sane-backends: Out-of-bounds read in esci2_check_header
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
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:
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 1850589, 1850590, 1852677    
Bug Blocks: 1848100    

Description Pedro Sampaio 2020-06-24 13:57:41 UTC
A flaw was found in sane-backends before version 1.0.30. An out-of-bounds read in esci2_check_header function may lead to disclosure of information.

Upstream issue:

https://gitlab.com/sane-project/backends/-/issues/279#issue-7-ghsl-2020-083-out-of-bounds-read-in-esci2_check_header

References:

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

Comment 1 Pedro Sampaio 2020-06-24 13:58:04 UTC
Created mingw-sane-backends tracking bugs for this issue:

Affects: fedora-all [bug 1850590]


Created sane-backends tracking bugs for this issue:

Affects: fedora-all [bug 1850589]

Comment 2 Huzaifa S. Sidhpurwala 2020-07-01 04:39:54 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 is affected by this flaw.

Comment 5 Huzaifa S. Sidhpurwala 2020-07-01 04:44:15 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.

Comment 6 Huzaifa S. Sidhpurwala 2020-07-01 05:09:42 UTC
Upstream commit: https://gitlab.com/sane-project/backends/-/commit/226d9c92899facf4b22b98c73be6ad2cd0effc4a