Bug 2320532 (CVE-2024-49957) - CVE-2024-49957 kernel: ocfs2: fix null-ptr-deref when journal load failed.
Summary: CVE-2024-49957 kernel: ocfs2: fix null-ptr-deref when journal load failed.
Keywords:
Status: NEW
Alias: CVE-2024-49957
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: 2321064
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-10-21 19:08 UTC by OSIDB Bzimport
Modified: 2024-10-24 04:26 UTC (History)
4 users (show)

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


Attachments (Terms of Use)

Description OSIDB Bzimport 2024-10-21 19:08:49 UTC
In the Linux kernel, the following vulnerability has been resolved:

ocfs2: fix null-ptr-deref when journal load failed.

During the mounting process, if journal_reset() fails because of too short
journal, then lead to jbd2_journal_load() fails with NULL j_sb_buffer. 
Subsequently, ocfs2_journal_shutdown() calls
jbd2_journal_flush()->jbd2_cleanup_journal_tail()->
__jbd2_update_log_tail()->jbd2_journal_update_sb_log_tail()
->lock_buffer(journal->j_sb_buffer), resulting in a null-pointer
dereference error.

To resolve this issue, we should check the JBD2_LOADED flag to ensure the
journal was properly loaded.  Additionally, use journal instead of
osb->journal directly to simplify the code.


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