Skip to content
Heist/ feed
Back to feed
HighFix available

exec: Fix ToCToU between perm check and set-uid/gid usage

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: exec: Fix ToCToU between perm check and set-uid/gid usage When opening a file for exec via do_filp_open(), permission checking is done against the file's metadata at that moment, and on success, a file pointer is passed back. Much later in the execve() code path, the file metadata (specifically mode, uid, and gid) is used to determine if/how to set the uid and gid. However, those values may have changed since the permissions check, meaning the execution may gain unintended privileges. For example, if a file could change permissions from executable and not set-id: ---------x 1 root root 16048 Aug 7 13:16 target to set-id and non-executable: ---S------ 1 root root 16048 Aug 7 13:16 target it is possible to gain root privileges when execution should have been disallowed. While this race condition is rare in real-world scenarios, it has been observed (and proven exploitable) when package managers are updating the setuid bits of installed programs. Such files start with being world-executable but then are adjusted to be group-exec with a set-uid bit. For example, "chmod o-x,u+s target" makes "target" executable only by uid "root" and gid "cdrom", while also becoming setuid-root: -rwxr-xr-x 1 root cdrom 16048 Aug 7 13:16 target becomes: -rwsr-xr-- 1 root cdrom 16048 Aug 7 13:16 target But racing the chmod means users without group "cdrom" membership can get the permission to execute "target" just before the chmod,

Products
Kernel
Affected versions
Not specified
Fixed versions
4.19.320, 5.10.224, 5.15.165, 5.4.282, 6.1.106, 6.10.6, 6.6.47
CVEs
CVE-2024-43882
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 00:59 UTC · Revision 1

Source evidence

exec: Fix ToCToU between perm check and set-uid/gid usage

core-osv · Original source

Published 21 Aug 2024, 00:10 UTC

In the Linux kernel, the following vulnerability has been resolved: exec: Fix ToCToU between perm check and set-uid/gid usage When opening a file for exec via do_filp_open(), permission checking is done against the file's metadata at that moment, and on success, a file pointer is passed back. Much later in the execve() code path, the file metadata (specifically mode, uid, and gid) is used to determine if/how to set the uid and gid. However, those values may have changed since the permissions check, meaning the execution may gain unintended privileges. For example, if a file could change permissions from executable and not set-id: ---------x 1 root root 16048 Aug 7 13:16 target to set-id and non-executable: ---S------ 1 root root 16048 Aug 7 13:16 target it is possible to gain root privileges when execution should have been disallowed. While this race condition is rare in real-world scenarios, it has been observed (and proven exploitable) when package managers are updating the setuid bits of installed programs. Such files start with being world-executable but then are adjusted to be group-exec with a set-uid bit. For example, "chmod o-x,u+s target" makes "target" executable only by uid "root" and gid "cdrom", while also becoming setuid-root: -rwxr-xr-x 1 root cdrom 16048 Aug 7 13:16 target becomes: -rwsr-xr-- 1 root cdrom 16048 Aug 7 13:16 target But racing the chmod means users without group "cdrom" membership can get the permission to execute "target" just before the chmod,

osv:CVE-2024-43882

Kernel

Fixed versions: 4.19.320, 5.4.282, 5.10.224, 5.15.165, 6.1.106, 6.6.47, 6.10.6

Complete source record
{
  "id": "91cd43c1d5a59886bd5f191f6cd6cab6083664ff98048271d16df4604664eb58",
  "url": "https://osv.dev/vulnerability/CVE-2024-43882",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "exec: Fix ToCToU between perm check and set-uid/gid usage",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: exec: Fix ToCToU between perm check and set-uid/gid usage When opening a file for exec via do_filp_open(), permission checking is done against the file's metadata at that moment, and on success, a file pointer is passed back. Much later in the execve() code path, the file metadata (specifically mode, uid, and gid) is used to determine if/how to set the uid and gid. However, those values may have changed since the permissions check, meaning the execution may gain unintended privileges. For example, if a file could change permissions from executable and not set-id: ---------x 1 root root 16048 Aug 7 13:16 target to set-id and non-executable: ---S------ 1 root root 16048 Aug 7 13:16 target it is possible to gain root privileges when execution should have been disallowed. While this race condition is rare in real-world scenarios, it has been observed (and proven exploitable) when package managers are updating the setuid bits of installed programs. Such files start with being world-executable but then are adjusted to be group-exec with a set-uid bit. For example, \"chmod o-x,u+s target\" makes \"target\" executable only by uid \"root\" and gid \"cdrom\", while also becoming setuid-root: -rwxr-xr-x 1 root cdrom 16048 Aug 7 13:16 target becomes: -rwsr-xr-- 1 root cdrom 16048 Aug 7 13:16 target But racing the chmod means users without group \"cdrom\" membership can get the permission to execute \"target\" just before the chmod, ",
    "evidence": "osv:CVE-2024-43882",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.19.320",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.4.282",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.224",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.165",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.106",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.47",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.10.6",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-43882",
      "aliases": [
        "CVE-2024-43882"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "9167b0b9a0ab7907191523f5a0528e3b9c288e21"
                },
                {
                  "fixed": "d5c3c7e26275a2d83b894d30f7582a42853a958f"
                },
                {
                  "fixed": "368f6985d46657b8b466a421dddcacd4051f7ada"
                },
                {
                  "fixed": "15469d46ba34559bfe7e3de6659115778c624759"
                },
                {
                  "fixed": "9b424c5d4130d56312e2a3be17efb0928fec4d64"
                },
                {
                  "fixed": "f6cfc6bcfd5e1cf76115b6450516ea4c99897ae1"
                },
                {
                  "fixed": "d2a2a4714d80d09b0f8eb6438ab4224690b7121e"
                },
                {
                  "fixed": "90dfbba89ad4f0d9c9744ecbb1adac4aa2ff4f3e"
                },
                {
                  "fixed": "f50733b45d865f91db90919f8311e2127ce5a0cb"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-43882.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.6.18"
                },
                {
                  "fixed": "4.19.320"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.20.0"
                },
                {
                  "fixed": "5.4.282"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.224"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.165"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.106"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.47"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.10.6"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-43882.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:41.581526375Z",
      "provider": "osv",
      "references": [
        "https://cert-portal.siemens.com/productcert/html/ssa-265688.html",
        "https://cert-portal.siemens.com/productcert/html/ssa-355557.html",
        "https://cert-portal.siemens.com/productcert/html/ssa-613116.html",
        "https://git.kernel.org/stable/c/15469d46ba34559bfe7e3de6659115778c624759",
        "https://git.kernel.org/stable/c/368f6985d46657b8b466a421dddcacd4051f7ada",
        "https://git.kernel.org/stable/c/90dfbba89ad4f0d9c9744ecbb1adac4aa2ff4f3e",
        "https://git.kernel.org/stable/c/9b424c5d4130d56312e2a3be17efb0928fec4d64",
        "https://git.kernel.org/stable/c/d2a2a4714d80d09b0f8eb6438ab4224690b7121e",
        "https://git.kernel.org/stable/c/d5c3c7e26275a2d83b894d30f7582a42853a958f",
        "https://git.kernel.org/stable/c/f50733b45d865f91db90919f8311e2127ce5a0cb",
        "https://git.kernel.org/stable/c/f6cfc6bcfd5e1cf76115b6450516ea4c99897ae1",
        "https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html",
        "https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/43xxx/CVE-2024-43882.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-43882",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/43xxx/CVE-2024-43882.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-43882",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 508825,
  "published_at": "2024-08-21T00:10:49.556+00:00"
}