VDB

CVE-2024-46695

CVE-2024-46695 PUBLISHED CVSS 9.8 CRITICAL

selinux,smack: don't bypass permissions check in inode_setsecctx hook

Reported by linux · Published September 13, 2024

In the Linux kernel, the following vulnerability has been resolved: selinux,smack: don't bypass permissions check in inode_setsecctx hook Marek Gresko reports that the root user on an NFS client is able to change the security labels on files on an NFS filesystem that is exported with root squashing enabled. The end of the kerneldoc comment for __vfs_setxattr_noperm() states: * This function requires the caller to lock the inode's i_mutex before it * is executed. It also assumes that the caller will make the appropriate * permission checks. nfsd_setattr() does do permissions checking via fh_verify() and nfsd_permission(), but those don't do all the same permissions checks that are done by security_inode_setxattr() and its related LSM hooks do. Since nfsd_setattr() is the only consumer of security_inode_setsecctx(), simplest solution appears to be to replace the call to __vfs_setxattr_noperm() with a call to __vfs_setxattr_locked(). This fixes the above issue and has the added benefit of causing nfsd to recall conflicting delegations on a file when a client tries to change its security label.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernel-modules-extraAmazon Linux6.1.115-126.197.amzn2023
kernelAmazon Linux6.1.115-126.197.amzn2023
bpftoolAmazon Linux6.1.115-126.197.amzn2023
kernel-libbpfAmazon Linux6.1.115-126.197.amzn2023
kernel-tools-develAmazon Linux6.1.115-126.197.amzn2023
python3-perfAmazon Linux6.1.115-126.197.amzn2023
kernel-develAmazon Linux6.1.115-126.197.amzn2023
linux_kernellinux6.10.8, 6.6.49
LinuxLinuxfe0cd53791119f6287b6532af8ce41576d664930, f71ec019257ba4f7ab198bd948c5902a207bad96, eebec98791d0137e455cc006411bb92a54250924, 76a0e79bc84f466999fa501fce5bf7a07641b8a7

Risk scores

CVSS 3.1
9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
LinuxLinux18032ca062e621e15683cb61c066ef3dc5414a7b, 18032ca062e621e15683cb61c066ef3dc5414a7b, 18032ca062e621e15683cb61c066ef3dc5414a7b
LinuxLinux3.11, 0, 5.10.227
amazon:2023kernel-modules-extra0
amazon:2023kernel0
amazon:2023bpftool0
amazon:2023kernel-libbpf0
amazon:2023kernel-tools-devel0
amazon:2023python3-perf0
amazon:2023kernel-devel0
LinuxLinux5.15.168, 5.10.227, 0
amazon:2023kernel-libbpf-devel0
amazon:2023kernel-tools0
linuxlinux_kernel3.11, 3.11, 3.11
amazon:2023kernel-livepatch-6.1.115-126.1970
amazon:2023kernel-libbpf-static0
amazon:2023perf0
amazon:2023kernel-modules-extra-common0
amazon:2023kernel-headers0

Timeline

  • Sep 12, 2024 CVE Published
  • Sep 14, 2024 EPSS Score (30 in total, the first dated here)
  • Oct 5, 2024 Coalition ESS Score (8 in total, the first dated here)
  • Jan 4, 2026 Security Advisory (75 in total, the first dated here)
  • Mar 30, 2026 Distribution Patch (62 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2024-46695
vulnetix vdb fixes CVE-2024-46695

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-46695/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›