Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 732000 (CVE-2020-13131, CVE-2020-13132)

Summary: <sys-auth/yubico-piv-tool-2.1.1: Multiple vulnerabilities (CVE-2020-{13131,13132})
Product: Gentoo Security Reporter: John Helmert III <ajak>
Component: VulnerabilitiesAssignee: Gentoo Security <security>
Severity: trivial CC: marecki
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also:
Whiteboard: ~3 [noglsa cve]
Package list:
Runtime testing required: ---

Description John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2020-07-09 22:27:57 UTC

An issue was discovered in Yubico libykpiv before 2.1.0. lib/util.c in this library (which is included in yubico-piv-tool) does not properly check embedded length fields during device communication. A malicious PIV token can misreport the returned length fields during RSA key generation. This will cause stack memory to be copied into heap allocated memory that gets returned to the caller. The leaked memory could include PINs, passwords, key material, and other sensitive information depending on the integration. During further processing by the caller, this information could leak across trust boundaries. Note that RSA key generation is triggered by the host and cannot directly be triggered by the token.


An issue was discovered in Yubico libykpiv before 2.1.0. An attacker can trigger an incorrect free() in the ykpiv_util_generate_key() function in lib/util.c through incorrect error handling code. This could be used to cause a denial of service attack.
Comment 1 Larry the Git Cow gentoo-dev 2020-08-24 14:38:54 UTC
The bug has been closed via the following commit(s):

commit 0338258449e3bd125f50ea3244c043efc3801dec
Author:     Sebastian Hamann <>
AuthorDate: 2020-08-10 18:05:50 +0000
Commit:     Joonas Niilola <>
CommitDate: 2020-08-24 14:38:45 +0000

    sys-auth/yubico-piv-tool: Bump to version 2.1.1
    Signed-off-by: Sebastian Hamann <>
    Signed-off-by: Joonas Niilola <>

 sys-auth/yubico-piv-tool/Manifest                  |  1 +
 .../yubico-piv-tool-2.1.1-install-man-page.patch   | 29 +++++++++++++++++
 .../yubico-piv-tool/yubico-piv-tool-2.1.1.ebuild   | 38 ++++++++++++++++++++++
 3 files changed, 68 insertions(+)
Comment 2 Joonas Niilola gentoo-dev 2020-08-24 14:42:43 UTC
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-08-24 17:14:08 UTC
Needs cleanup.
Comment 4 Larry the Git Cow gentoo-dev 2020-09-06 20:27:26 UTC
The bug has been referenced in the following commit(s):

commit d790b279143cdc1e60dfada747de6f8d9c70fdf4
Author:     Marek Szuba <>
AuthorDate: 2020-09-06 20:26:10 +0000
Commit:     Marek Szuba <>
CommitDate: 2020-09-06 20:27:16 +0000

    sys-auth/yubico-piv-tool: remove old
    Signed-off-by: Marek Szuba <>

 sys-auth/yubico-piv-tool/Manifest                  |  1 -
 .../yubico-piv-tool/yubico-piv-tool-1.6.2.ebuild   | 49 ----------------------
 2 files changed, 50 deletions(-)
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-09-06 20:37:53 UTC