Bug 2312083 (CVE-2024-46695) - CVE-2024-46695 kernel: selinux,smack: don't bypass permissions check in inode_setsecctx hook
Summary: CVE-2024-46695 kernel: selinux,smack: don't bypass permissions check in inode...
Keywords:
Status: NEW
Alias: CVE-2024-46695
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On: 2312215
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-09-13 06:21 UTC by OSIDB Bzimport
Modified: 2025-04-25 17:25 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2024:10985 0 None None None 2024-12-12 08:55:24 UTC
Red Hat Product Errata RHBA-2024:11008 0 None None None 2024-12-12 16:41:04 UTC
Red Hat Product Errata RHBA-2024:11050 0 None None None 2024-12-16 01:16:08 UTC
Red Hat Product Errata RHBA-2024:11557 0 None None None 2024-12-19 14:09:01 UTC
Red Hat Product Errata RHBA-2025:0027 0 None None None 2025-01-02 18:13:42 UTC
Red Hat Product Errata RHSA-2024:10939 0 None None None 2024-12-11 00:59:03 UTC
Red Hat Product Errata RHSA-2024:10943 0 None None None 2024-12-11 01:09:10 UTC
Red Hat Product Errata RHSA-2024:10944 0 None None None 2024-12-11 00:38:45 UTC
Red Hat Product Errata RHSA-2025:1658 0 None None None 2025-02-19 00:50:54 UTC

Description OSIDB Bzimport 2024-09-13 06:21:30 UTC
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.

Comment 3 errata-xmlrpc 2024-12-11 00:38:44 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2024:10944 https://access.redhat.com/errata/RHSA-2024:10944

Comment 4 errata-xmlrpc 2024-12-11 00:59:02 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:10939 https://access.redhat.com/errata/RHSA-2024:10939

Comment 5 errata-xmlrpc 2024-12-11 01:09:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2024:10943 https://access.redhat.com/errata/RHSA-2024:10943

Comment 8 errata-xmlrpc 2025-02-19 00:50:53 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.4 Extended Update Support

Via RHSA-2025:1658 https://access.redhat.com/errata/RHSA-2025:1658


Note You need to log in before you can comment on or make changes to this bug.