{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "741a295130606143edbf9fc740f633dbc1e6225f"
            },
            {
              "fixed": "845bf3c6963a52096d0d3866e4a92db77a0c03d8"
            },
            {
              "fixed": "d3ffc8f13034af895531a02c30b1fe3a34b46432"
            },
            {
              "fixed": "d0d99f60538ddb4a62ccaac2168d8f448965f083"
            },
            {
              "fixed": "d7963d6997fea86a6def242ac36198b86655f912"
            },
            {
              "fixed": "aa9ebc084505fb26dd90f4d7a249045aad152043"
            },
            {
              "fixed": "af8f4be3b68ac8caa41c8e5ead0eeaf5e85e42d0"
            },
            {
              "fixed": "42e21e74061b0ebbd859839f81acf10efad02a27"
            },
            {
              "fixed": "6c4b2243cb6c0755159bd567130d5e12e7b10d9f"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.6.16"
            },
            {
              "fixed": "5.10.253"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.11.0"
            },
            {
              "fixed": "5.15.203"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.16.0"
            },
            {
              "fixed": "6.1.167"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.2.0"
            },
            {
              "fixed": "6.6.130"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.7.0"
            },
            {
              "fixed": "6.12.78"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.13.0"
            },
            {
              "fixed": "6.18.19"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "6.19.9"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/43xxx/CVE-2026-43472.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nunshare: fix unshare_fs() handling\n\nThere's an unpleasant corner case in unshare(2), when we have a\nCLONE_NEWNS in flags and current-\u003efs hadn't been shared at all; in that\ncase copy_mnt_ns() gets passed current-\u003efs instead of a private copy,\nwhich causes interesting warts in proof of correctness]\n\n\u003e I guess if private means fs-\u003eusers == 1, the condition could still be true.\n\nUnfortunately, it's worse than just a convoluted proof of correctness.\nConsider the case when we have CLONE_NEWCGROUP in addition to CLONE_NEWNS\n(and current-\u003efs-\u003eusers == 1).\n\nWe pass current-\u003efs to copy_mnt_ns(), all right.  Suppose it succeeds and\nflips current-\u003efs-\u003e{pwd,root} to corresponding locations in the new namespace.\nNow we proceed to copy_cgroup_ns(), which fails (e.g. with -ENOMEM).\nWe call put_mnt_ns() on the namespace created by copy_mnt_ns(), it's\ndestroyed and its mount tree is dissolved, but...  current-\u003efs-\u003eroot and\ncurrent-\u003efs-\u003epwd are both left pointing to now detached mounts.\n\nThey are pinning those, so it's not a UAF, but it leaves the calling\nprocess with unshare(2) failing with -ENOMEM _and_ leaving it with\npwd and root on detached isolated mounts.  The last part is clearly a bug.\n\nThere is other fun related to that mess (races with pivot_root(), including\nthe one between pivot_root() and fork(), of all things), but this one\nis easy to isolate and fix - treat CLONE_NEWNS as \"allocate a new\nfs_struct even if it hadn't been shared in the first place\".  Sure, we could\ngo for something like \"if both CLONE_NEWNS *and* one of the things that might\nend up failing after copy_mnt_ns() call in create_new_namespaces() are set,\nforce allocation of new fs_struct\", but let's keep it simple - the cost\nof copy_fs_struct() is trivial.\n\nAnother benefit is that copy_mnt_ns() with CLONE_NEWNS *always* gets\na freshly allocated fs_struct, yet to be attached to anything.  That\nseriously simplifies the analysis...\n\nFWIW, that bug had been there since the introduction of unshare(2) ;-/",
  "id": "CVE-2026-43472",
  "modified": "2026-07-08T05:37:34.976451417Z",
  "published": "2026-05-08T14:22:31.556Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/42e21e74061b0ebbd859839f81acf10efad02a27"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/6c4b2243cb6c0755159bd567130d5e12e7b10d9f"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/845bf3c6963a52096d0d3866e4a92db77a0c03d8"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/aa9ebc084505fb26dd90f4d7a249045aad152043"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/af8f4be3b68ac8caa41c8e5ead0eeaf5e85e42d0"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/d0d99f60538ddb4a62ccaac2168d8f448965f083"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/d3ffc8f13034af895531a02c30b1fe3a34b46432"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/d7963d6997fea86a6def242ac36198b86655f912"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/43xxx/CVE-2026-43472.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-43472"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.7.5",
  "summary": "unshare: fix unshare_fs() handling"
}