CVE-2024-49957

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

published October 21, 2024

CVSS
—
EPSS
0%
Percentile
15.4
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.00250 · 15.4th percentile
Published
2024-10-21T18:02Z
EPSS history
Timeline
  • 21 OCT 18:02Z
    ocfs2: fix null-ptr-deref when journal load failed.
    cvelistv5