Bug 2330957 (CVE-2024-53143) - CVE-2024-53143 kernel: fsnotify: Fix ordering of iput() and watched_objects decrement
Summary: CVE-2024-53143 kernel: fsnotify: Fix ordering of iput() and watched_objects d...
Keywords:
Status: NEW
Alias: CVE-2024-53143
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:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-12-07 07:01 UTC by OSIDB Bzimport
Modified: 2024-12-13 04:53 UTC (History)
4 users (show)

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


Attachments (Terms of Use)

Description OSIDB Bzimport 2024-12-07 07:01:02 UTC
In the Linux kernel, the following vulnerability has been resolved:

fsnotify: Fix ordering of iput() and watched_objects decrement

Ensure the superblock is kept alive until we're done with iput().
Holding a reference to an inode is not allowed unless we ensure the
superblock stays alive, which fsnotify does by keeping the
watched_objects count elevated, so iput() must happen before the
watched_objects decrement.
This can lead to a UAF of something like sb->s_fs_info in tmpfs, but the
UAF is hard to hit because race orderings that oops are more likely, thanks
to the CHECK_DATA_CORRUPTION() block in generic_shutdown_super().

Also, ensure that fsnotify_put_sb_watched_objects() doesn't call
fsnotify_sb_watched_objects() on a superblock that may have already been
freed, which would cause a UAF read of sb->s_fsnotify_info.

Comment 1 Avinash Hanwate 2024-12-09 04:40:44 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024120746-CVE-2024-53143-05ed@gregkh/T


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