CVE-2021-37600
Description
An integer overflow in util-linux through 2.37.1 can potentially cause a buffer overflow if an attacker were able to use system resources in a way that leads to a large number in the /proc/sysvipc/sem file. NOTE: this is unexploitable in GNU C Library environments, and possibly in all realistic environments.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
67- util-linux/util-linuxdescription
- Range: <=2.37.1
- osv-coords65 versionspkg:rpm/opensuse/python3-libmount&distro=openSUSE%20Leap%2015.2pkg:rpm/opensuse/python3-libmount&distro=openSUSE%20Leap%2015.3pkg:rpm/opensuse/util-linux&distro=openSUSE%20Leap%2015.2pkg:rpm/opensuse/util-linux&distro=openSUSE%20Leap%2015.3pkg:rpm/opensuse/util-linux-systemd&distro=openSUSE%20Leap%2015.2pkg:rpm/opensuse/util-linux-systemd&distro=openSUSE%20Leap%2015.3pkg:rpm/suse/python-libmount&distro=HPE%20Helion%20OpenStack%208pkg:rpm/suse/python-libmount&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-BCLpkg:rpm/suse/python-libmount&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-BCLpkg:rpm/suse/python-libmount&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-LTSSpkg:rpm/suse/python-libmount&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4-LTSSpkg:rpm/suse/python-libmount&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5pkg:rpm/suse/python-libmount&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP3pkg:rpm/suse/python-libmount&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP4pkg:rpm/suse/python-libmount&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5pkg:rpm/suse/python-libmount&distro=SUSE%20OpenStack%20Cloud%208pkg:rpm/suse/python-libmount&distro=SUSE%20OpenStack%20Cloud%209pkg:rpm/suse/python-libmount&distro=SUSE%20OpenStack%20Cloud%20Crowbar%208pkg:rpm/suse/python-libmount&distro=SUSE%20OpenStack%20Cloud%20Crowbar%209pkg:rpm/suse/util-linux&distro=HPE%20Helion%20OpenStack%208pkg:rpm/suse/util-linux&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-ESPOSpkg:rpm/suse/util-linux&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-LTSSpkg:rpm/suse/util-linux&distro=SUSE%20Linux%20Enterprise%20Micro%205.0pkg:rpm/suse/util-linux&distro=SUSE%20Linux%20Enterprise%20Micro%205.1pkg:rpm/suse/util-linux&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP2pkg:rpm/suse/util-linux&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP3pkg:rpm/suse/util-linux&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-BCLpkg:rpm/suse/util-linux&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-BCLpkg:rpm/suse/util-linux&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-LTSSpkg:rpm/suse/util-linux&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4-LTSSpkg:rpm/suse/util-linux&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5pkg:rpm/suse/util-linux&distro=SUSE%20Linux%20Enterprise%20Server%2015-LTSSpkg:rpm/suse/util-linux&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP3pkg:rpm/suse/util-linux&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP4pkg:rpm/suse/util-linux&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5pkg:rpm/suse/util-linux&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015pkg:rpm/suse/util-linux&distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP5pkg:rpm/suse/util-linux&distro=SUSE%20Linux%20Enterprise%20Workstation%20Extension%2012%20SP5pkg:rpm/suse/util-linux&distro=SUSE%20OpenStack%20Cloud%208pkg:rpm/suse/util-linux&distro=SUSE%20OpenStack%20Cloud%209pkg:rpm/suse/util-linux&distro=SUSE%20OpenStack%20Cloud%20Crowbar%208pkg:rpm/suse/util-linux&distro=SUSE%20OpenStack%20Cloud%20Crowbar%209pkg:rpm/suse/util-linux-systemd&distro=HPE%20Helion%20OpenStack%208pkg:rpm/suse/util-linux-systemd&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-ESPOSpkg:rpm/suse/util-linux-systemd&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-LTSSpkg:rpm/suse/util-linux-systemd&distro=SUSE%20Linux%20Enterprise%20Micro%205.0pkg:rpm/suse/util-linux-systemd&distro=SUSE%20Linux%20Enterprise%20Micro%205.1pkg:rpm/suse/util-linux-systemd&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP2pkg:rpm/suse/util-linux-systemd&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP3pkg:rpm/suse/util-linux-systemd&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Server%20Applications%2015%20SP2pkg:rpm/suse/util-linux-systemd&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Server%20Applications%2015%20SP3pkg:rpm/suse/util-linux-systemd&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-BCLpkg:rpm/suse/util-linux-systemd&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-BCLpkg:rpm/suse/util-linux-systemd&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-LTSSpkg:rpm/suse/util-linux-systemd&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4-LTSSpkg:rpm/suse/util-linux-systemd&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5pkg:rpm/suse/util-linux-systemd&distro=SUSE%20Linux%20Enterprise%20Server%2015-LTSSpkg:rpm/suse/util-linux-systemd&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP3pkg:rpm/suse/util-linux-systemd&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP4pkg:rpm/suse/util-linux-systemd&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5pkg:rpm/suse/util-linux-systemd&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015pkg:rpm/suse/util-linux-systemd&distro=SUSE%20OpenStack%20Cloud%208pkg:rpm/suse/util-linux-systemd&distro=SUSE%20OpenStack%20Cloud%209pkg:rpm/suse/util-linux-systemd&distro=SUSE%20OpenStack%20Cloud%20Crowbar%208pkg:rpm/suse/util-linux-systemd&distro=SUSE%20OpenStack%20Cloud%20Crowbar%209
< 2.33.2-lp152.5.9.1+ 64 more
- (no CPE)range: < 2.33.2-lp152.5.9.1
- (no CPE)range: < 2.36.2-4.5.1
- (no CPE)range: < 2.33.2-lp152.5.9.1
- (no CPE)range: < 2.36.2-4.5.1
- (no CPE)range: < 2.33.2-lp152.5.9.1
- (no CPE)range: < 2.36.2-4.5.1
- (no CPE)range: < 2.29.2-3.24.1
- (no CPE)range: < 2.28-44.35.1
- (no CPE)range: < 2.29.2-3.24.1
- (no CPE)range: < 2.29.2-3.24.1
- (no CPE)range: < 2.29.2-9.17.1
- (no CPE)range: < 2.33.2-4.11.1
- (no CPE)range: < 2.29.2-3.24.1
- (no CPE)range: < 2.29.2-9.17.1
- (no CPE)range: < 2.33.2-4.11.1
- (no CPE)range: < 2.29.2-3.24.1
- (no CPE)range: < 2.29.2-9.17.1
- (no CPE)range: < 2.29.2-3.24.1
- (no CPE)range: < 2.29.2-9.17.1
- (no CPE)range: < 2.29.2-3.24.1
- (no CPE)range: < 2.31.1-150000.9.18.2
- (no CPE)range: < 2.31.1-150000.9.18.2
- (no CPE)range: < 2.33.2-4.16.1
- (no CPE)range: < 2.36.2-4.5.1
- (no CPE)range: < 2.33.2-4.16.1
- (no CPE)range: < 2.36.2-4.5.1
- (no CPE)range: < 2.28-44.35.1
- (no CPE)range: < 2.29.2-3.24.1
- (no CPE)range: < 2.29.2-3.24.1
- (no CPE)range: < 2.29.2-9.17.1
- (no CPE)range: < 2.33.2-4.11.1
- (no CPE)range: < 2.31.1-150000.9.18.2
- (no CPE)range: < 2.29.2-3.24.1
- (no CPE)range: < 2.29.2-9.17.1
- (no CPE)range: < 2.33.2-4.11.1
- (no CPE)range: < 2.31.1-150000.9.18.2
- (no CPE)range: < 2.33.2-4.11.1
- (no CPE)range: < 2.33.2-4.11.1
- (no CPE)range: < 2.29.2-3.24.1
- (no CPE)range: < 2.29.2-9.17.1
- (no CPE)range: < 2.29.2-3.24.1
- (no CPE)range: < 2.29.2-9.17.1
- (no CPE)range: < 2.29.2-3.24.1
- (no CPE)range: < 2.31.1-150000.9.18.2
- (no CPE)range: < 2.31.1-150000.9.18.2
- (no CPE)range: < 2.33.2-4.16.1
- (no CPE)range: < 2.36.2-4.5.1
- (no CPE)range: < 2.33.2-4.16.1
- (no CPE)range: < 2.36.2-4.5.1
- (no CPE)range: < 2.33.2-4.16.1
- (no CPE)range: < 2.36.2-4.5.1
- (no CPE)range: < 2.28-44.35.1
- (no CPE)range: < 2.29.2-3.24.1
- (no CPE)range: < 2.29.2-3.24.1
- (no CPE)range: < 2.29.2-9.17.1
- (no CPE)range: < 2.33.2-4.11.1
- (no CPE)range: < 2.31.1-150000.9.18.2
- (no CPE)range: < 2.29.2-3.24.1
- (no CPE)range: < 2.29.2-9.17.1
- (no CPE)range: < 2.33.2-4.11.1
- (no CPE)range: < 2.31.1-150000.9.18.2
- (no CPE)range: < 2.29.2-3.24.1
- (no CPE)range: < 2.29.2-9.17.1
- (no CPE)range: < 2.29.2-3.24.1
- (no CPE)range: < 2.29.2-9.17.1
Patches
Vulnerability mechanics
Root cause
"Missing integer overflow check before calloc() for a uint64 nmembs value allows a large sem_nsems to cause an undersized buffer allocation."
Attack vector
An attacker who can influence the `/proc/sysvipc/sem` file to contain a very large `sem_nsems` value could trigger an integer overflow in the `xcalloc()` call within `get_sem_elements()` [ref_id=1]. This overflow could cause a smaller-than-expected buffer to be allocated, potentially leading to a heap buffer overflow when elements are written into it. The advisory notes this is unexploitable in GNU C Library environments and possibly all realistic environments, as the large number would need to be crafted through system resource manipulation.
Affected code
The vulnerability resides in `sys-utils/ipcutils.c` in the `get_sem_elements()` function. The function calls `xcalloc(p->sem_nsems, sizeof(struct sem_elem))` without first checking whether `p->sem_nsems` could overflow when multiplied by the element size, leading to a potential integer overflow. The patch adds a guard `p->sem_nsems > SIZE_MAX` before the allocation call [ref_id=1].
What the fix does
The patch adds a bounds check `p->sem_nsems > SIZE_MAX` before the `xcalloc()` call, preventing the multiplication `p->sem_nsems * sizeof(struct sem_elem)` from overflowing [ref_id=1]. If `sem_nsems` exceeds `SIZE_MAX`, the function returns early without attempting the allocation, thus avoiding the integer overflow that could lead to an undersized buffer.
Preconditions
- inputThe attacker must be able to influence the /proc/sysvipc/sem file to contain a very large sem_nsems value, likely through exhausting system IPC resources.
- configThe advisory states this is unexploitable in GNU C Library environments and possibly all realistic environments.
Generated on May 30, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- security.gentoo.org/glsa/202401-08mitrevendor-advisory
- lists.debian.org/debian-lts-announce/2024/04/msg00005.htmlmitremailing-list
- github.com/karelzak/util-linux/commit/1c9143d0c1f979c3daf10e1c37b5b1e916c22a1cmitre
- github.com/karelzak/util-linux/issues/1395mitre
- security.netapp.com/advisory/ntap-20210902-0002/mitre
News mentions
0No linked articles in our index yet.