CVE-2026-43472

EUVD-2026-28778
In the Linux kernel, the following vulnerability has been resolved:

unshare: fix unshare_fs() handling

There's an unpleasant corner case in unshare(2), when we have a
CLONE_NEWNS in flags and current->fs hadn't been shared at all; in that
case copy_mnt_ns() gets passed current->fs instead of a private copy,
which causes interesting warts in proof of correctness]

> I guess if private means fs->users == 1, the condition could still be true.

Unfortunately, it's worse than just a convoluted proof of correctness.
Consider the case when we have CLONE_NEWCGROUP in addition to CLONE_NEWNS
(and current->fs->users == 1).

We pass current->fs to copy_mnt_ns(), all right.  Suppose it succeeds and
flips current->fs->{pwd,root} to corresponding locations in the new namespace.
Now we proceed to copy_cgroup_ns(), which fails (e.g. with -ENOMEM).
We call put_mnt_ns() on the namespace created by copy_mnt_ns(), it's
destroyed and its mount tree is dissolved, but...  current->fs->root and
current->fs->pwd are both left pointing to now detached mounts.

They are pinning those, so it's not a UAF, but it leaves the calling
process with unshare(2) failing with -ENOMEM _and_ leaving it with
pwd and root on detached isolated mounts.  The last part is clearly a bug.

There is other fun related to that mess (races with pivot_root(), including
the one between pivot_root() and fork(), of all things), but this one
is easy to isolate and fix - treat CLONE_NEWNS as "allocate a new
fs_struct even if it hadn't been shared in the first place".  Sure, we could
go for something like "if both CLONE_NEWNS *and* one of the things that might
end up failing after copy_mnt_ns() call in create_new_namespaces() are set,
force allocation of new fs_struct", but let's keep it simple - the cost
of copy_fs_struct() is trivial.

Another benefit is that copy_mnt_ns() with CLONE_NEWNS *always* gets
a freshly allocated fs_struct, yet to be attached to anything.  That
seriously simplifies the analysis...

FWIW, that bug had been there since the introduction of unshare(2) ;-/
ProviderTypeBase ScoreAtk. VectorAtk. ComplexityPriv. RequiredVector
NISTPrimary
5.5 MEDIUM
LOCAL
LOW
LOW
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Base Score
CVSS 3.x
EPSS Score
Percentile: 1%
Affected Products (NVD)
VendorProductVersion
linuxlinux_kernel
2.6.16.1 ≤
𝑥
< 5.10.253
linuxlinux_kernel
5.11 ≤
𝑥
< 5.15.203
linuxlinux_kernel
5.16 ≤
𝑥
< 6.1.167
linuxlinux_kernel
6.2 ≤
𝑥
< 6.6.130
linuxlinux_kernel
6.7 ≤
𝑥
< 6.12.78
linuxlinux_kernel
6.13 ≤
𝑥
< 6.18.19
linuxlinux_kernel
6.19 ≤
𝑥
< 6.19.9
linuxlinux_kernel
2.6.16
linuxlinux_kernel
2.6.16:rc3
linuxlinux_kernel
2.6.16:rc4
linuxlinux_kernel
2.6.16:rc5
linuxlinux_kernel
2.6.16:rc6
linuxlinux_kernel
2.6.16:rc7
linuxlinux_kernel
7.0:rc1
𝑥
= Vulnerable software versions
Debian logo
Debian Releases
Debian Product
Codename
linux
bookworm
6.1.170-3
fixed
bookworm (security)
6.1.174-1
fixed
bullseye
vulnerable
bullseye (security)
5.10.257-1
fixed
forky
7.0.12-2
fixed
sid
7.0.13-1
fixed
trixie
6.12.86-1
fixed
trixie (security)
6.12.94-1
fixed
Amazon Linux logo
Amazon Linux Releases
Amazon Package
Release
bpftool
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
bpftool-debuginfo
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
bpftool6.12
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
bpftool6.12-debuginfo
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
bpftool6.18
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
bpftool6.18-debuginfo
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
kernel
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
kernel-debuginfo
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
kernel-debuginfo-common-aarch64
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
kernel-debuginfo-common-x86_64
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
kernel-devel
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
kernel-headers
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
kernel-libbpf
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
kernel-libbpf-debuginfo
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
kernel-libbpf-devel
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
kernel-libbpf-static
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
kernel-livepatch-6.1.168-202.320
Amazon Linux 2023
1:1.0-0.amzn2023
fixed
kernel-livepatch-6.12.79-101.147
Amazon Linux 2023
1:1.0-0.amzn2023
fixed
kernel-livepatch-6.18.20-20.229
Amazon Linux 2023
1:1.0-0.amzn2023
fixed
kernel-modules-extra
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
kernel-modules-extra-common
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
kernel-tools
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
kernel-tools-debuginfo
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
kernel-tools-devel
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
kernel6.12
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
kernel6.12-debuginfo
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
kernel6.12-debuginfo-common-aarch64
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
kernel6.12-debuginfo-common-x86_64
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
kernel6.12-devel
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
kernel6.12-headers
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
kernel6.12-libbpf
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
kernel6.12-libbpf-debuginfo
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
kernel6.12-libbpf-devel
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
kernel6.12-libbpf-static
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
kernel6.12-modules-extra
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
kernel6.12-modules-extra-common
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
kernel6.12-tools
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
kernel6.12-tools-debuginfo
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
kernel6.12-tools-devel
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
kernel6.18
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
kernel6.18-debuginfo
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
kernel6.18-debuginfo-common-aarch64
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
kernel6.18-debuginfo-common-x86_64
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
kernel6.18-devel
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
kernel6.18-headers
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
kernel6.18-libbpf
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
kernel6.18-libbpf-debuginfo
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
kernel6.18-libbpf-devel
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
kernel6.18-libbpf-static
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
kernel6.18-modules-extra
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
kernel6.18-modules-extra-common
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
kernel6.18-tools
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
kernel6.18-tools-debuginfo
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
kernel6.18-tools-devel
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
perf
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
perf-debuginfo
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
perf6.12
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
perf6.12-debuginfo
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
perf6.18
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
perf6.18-debuginfo
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
python3-perf
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
python3-perf-debuginfo
Amazon Linux 2023
1:6.1.168-202.320.amzn2023
fixed
python3-perf6.12
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
python3-perf6.12-debuginfo
Amazon Linux 2023
1:6.12.79-101.147.amzn2023
fixed
python3-perf6.18
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed
python3-perf6.18-debuginfo
Amazon Linux 2023
1:6.18.20-20.229.amzn2023
fixed