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

Medium 5.5 Published Updated

A null pointer dereference in the Linux kernel OCFS2 filesystem can cause a system crash during mounting if journal loading fails.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-49957?

CVE-2024-49957 is a medium-severity vulnerability in Linux kernel, published on 21 Oct 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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.

Weakness: CWE-476

Which versions are affected by CVE-2024-49957?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-49957?

Apply the vendor's patch.

Is CVE-2024-49957 being exploited?

There is no known exploitation of CVE-2024-49957 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as AZL-51781, BELL-CVE-2024-49957, DEBIAN-CVE-2024-49957, GHSA-7pj6-rq69-3m65, UBUNTU-CVE-2024-49957.

Is CVE-2024-49957 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free