CVE-2023-34095 cpdb-libs vulnerable to buffer overflows via scanf
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: yes · technical impact: total
- Technology
- UbuntuDebian
Description
cpdb-libs provides frontend and backend libraries for the Common Printing Dialog Backends (CPDB) project. In versions 1.0 through 2.0b4, cpdb-libs is vulnerable to buffer overflows via improper use of scanf(3). cpdb-libs uses the fscanf() and scanf() functions to parse command lines and configuration files, dropping the read string components into fixed-length buffers, but does not limit the length of the strings to be read by fscanf() and scanf() causing buffer overflows when a string is longer than 1023 characters. A patch for this issue is available at commit f181bd1f14757c2ae0f17cc76dc20421a40f30b7. As all buffers have a length of 1024 characters, the patch limits the maximum string length to be read to 1023 by replacing all occurrences of %s with %1023s in all calls of the fscanf() and scanf() functions.
Upgrade path
7 packages: 6 fixed, 1 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| ubuntu/cpdb-libs(Ubuntu 18.04) | = 1.1.0-0ubuntu2; = 1.1.1-0ubuntu1; All versions | No fix listed | No fix yet |
| debian/cpdb-libs(Debian 12) | < 1.2.0-2+deb12u1; = 1.2.0-2 | 1.2.0-2+deb12u1 | Fixed |
| debian/cpdb-libs(Debian 13) | < 1.2.0-3 | 1.2.0-3 | Fixed |
| debian/cpdb-libs(Debian 14) | < 1.2.0-3 | 1.2.0-3 | Fixed |
| OpenPrinting cpdb-libs | = 2.0-beta1; = 2.0-beta2; = 2.0-beta3; = 2.0-beta4 +2 more | 2.0 | Fixed |
| ubuntu/cpdb-libs(Ubuntu 20.04) | < 1.2.0-0ubuntu7.1; = 1.2.0-0ubuntu6; = 1.2.0-0ubuntu7 | 1.2.0-0ubuntu7.1 | Fixed |
| ubuntu/cpdb-libs(Ubuntu 22.04) | < 1.2.0-0ubuntu8.1.22.04.1; = 1.2.0-0ubuntu8 | 1.2.0-0ubuntu8.1.22.04.1 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/cpdb-libs(Debian:12) | < 1.2.0-2+deb12u1 | 1.2.0-2+deb12u1 |
| debian/cpdb-libs(Debian:12) | = 1.2.0-2 | No fix listed |
| debian/cpdb-libs(Debian:13) | < 1.2.0-3 | 1.2.0-3 |
| debian/cpdb-libs(Debian:14) | < 1.2.0-3 | 1.2.0-3 |
| OpenPrinting cpdb-libs | = >= 1.0, <= 2.0b4 | No fix listed |
| ubuntu/cpdb-libs(Ubuntu:22.04) | < 1.2.0-0ubuntu8.1.22.04.1 | 1.2.0-0ubuntu8.1.22.04.1 |
| OpenPrinting cpdb-libs | >= 1.0, < 2.0 | 2.0 |
| OpenPrinting cpdb-libs | = 2.0-beta1 | No fix listed |
| OpenPrinting cpdb-libs | = 2.0-beta2 | No fix listed |
| OpenPrinting cpdb-libs | = 2.0-beta3 | No fix listed |
| OpenPrinting cpdb-libs | = 2.0-beta4 | No fix listed |
| ubuntu/cpdb-libs(Ubuntu:18.04) | All versions | No fix listed |
| ubuntu/cpdb-libs(Ubuntu:18.04) | = 1.1.0-0ubuntu2 | No fix listed |
| ubuntu/cpdb-libs(Ubuntu:18.04) | = 1.1.1-0ubuntu1 | No fix listed |
| ubuntu/cpdb-libs(Ubuntu:20.04) | < 1.2.0-0ubuntu7.1 | 1.2.0-0ubuntu7.1 |
| ubuntu/cpdb-libs(Ubuntu:20.04) | = 1.2.0-0ubuntu6 | No fix listed |
| ubuntu/cpdb-libs(Ubuntu:20.04) | = 1.2.0-0ubuntu7 | No fix listed |
| ubuntu/cpdb-libs(Ubuntu:22.04) | = 1.2.0-0ubuntu8 | No fix listed |
References
- Debian Security Tracker CVE-2023-34095 vendor-advisory
- https://github.com/OpenPrinting/cpdb-libs/security/advisories/GHSA-25j7-9gfc-f46x exploit issue-tracking vendor-advisory
- https://github.com/OpenPrinting/cpdb-libs/commit/f181bd1f14757c2ae0f17cc76dc20421a40f30b7 patch
- https://github.com/OpenPrinting/cpdb-libs/blob/85555fba64d34f53a2fce099b0488904cc48ed35/cpdb/cpdb-frontend.c#L372 product
- https://github.com/OpenPrinting/cpdb-libs/blob/85555fba64d34f53a2fce099b0488904cc48ed35/tools/cpdb-text-frontend.c#L362 product
- www.openwall.com exploit mailing-list third-party-advisory
- Ubuntu CVE tracker issue-tracking vendor-advisory
- USN-6204-1 vendor-advisory
- www.cve.org issue-tracking
- bugs.debian.org issue-tracking
- www.openwall.com issue-tracking