CVE-2024-46695
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-modules-extra | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel | Amazon Linux | 6.1.115-126.197.amzn2023 |
| bpftool | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel-libbpf | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel-tools-devel | Amazon Linux | 6.1.115-126.197.amzn2023 |
| python3-perf | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel-devel | Amazon Linux | 6.1.115-126.197.amzn2023 |
| linux_kernel | linux | 6.10.8, 6.6.49 |
| Linux | Linux | fe0cd53791119f6287b6532af8ce41576d664930, f71ec019257ba4f7ab198bd948c5902a207bad96, eebec98791d0137e455cc006411bb92a54250924, 76a0e79bc84f466999fa501fce5bf7a07641b8a7 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 18032ca062e621e15683cb61c066ef3dc5414a7b, 18032ca062e621e15683cb61c066ef3dc5414a7b, 18032ca062e621e15683cb61c066ef3dc5414a7b |
| Linux | Linux | 3.11, 0, 5.10.227 |
| amazon:2023 | kernel-modules-extra | 0 |
| amazon:2023 | kernel | 0 |
| amazon:2023 | bpftool | 0 |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| amazon:2023 | python3-perf | 0 |
| amazon:2023 | kernel-devel | 0 |
| Linux | Linux | 5.15.168, 5.10.227, 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| amazon:2023 | kernel-tools | 0 |
| linux | linux_kernel | 3.11, 3.11, 3.11 |
| amazon:2023 | kernel-livepatch-6.1.115-126.197 | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel-modules-extra-common | 0 |
| amazon:2023 | kernel-headers | 0 |
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