Gentoo: GLSA-202105-03: GPT fdisk: Integer underflow
Summary
It was discovered that ReadLogicalParts() function in basicmbr.cc was missing a bounds check.
Resolution
All GPT fdisk users should upgrade to the latest version:
# emerge --sync
# emerge --ask --oneshot --verbose ">=sys-apps/gptfdisk-1.0.6"
References
[ 1 ] CVE-2021-0308 https://nvd.nist.gov/vuln/detail/CVE-2021-0308
Availability
This GLSA and any updates to it are available for viewing at
the Gentoo Security Website:
https://security.gentoo.org/glsa/202105-03
Concerns
Security is a primary focus of Gentoo Linux and ensuring the confidentiality and security of our users' machines is of utmost importance to us. Any security concerns should be addressed to security@gentoo.org or alternatively, you may file a bug at https://bugs.gentoo.org.
Background
GPT fdisk (consisting of the gdisk, cgdisk, sgdisk, and fixparts programs) is a set of text-mode partitioning tools for Linux, FreeBSD, Mac OS X, and Windows.
Affected Packages
------------------------------------------------------------------- Package / Vulnerable / Unaffected ------------------------------------------------------------------- 1 sys-apps/gptfdisk < 1.0.6 >= 1.0.6
Impact
===== A local attacker could entice a user to insert a malicious formatted block device (USB stick or SD card for example), that, when processed with sgdisk, possibly resulting in local escalation of privileges or a Denial of Service condition.
Workaround
There is no known workaround at this time.