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

CVE-2024-49957
MEDIUM 5.5

At a glance

Source
NVD
EPSS
EPSS 0.25 % · percentile 16 ()
State
PUBLISHED
Published
Updated
Assigner
Linux
NVD status
Modified

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.

Weaknesses (CWE)

  • CWE-476 — NULL Pointer Dereference

References

Scores

VersionScoreVectorScored by
CVSS 3.1MEDIUM 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HNVD · nvd@nist.gov (Primary)

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
Linux · Linuxaffected f6f50e28f0cb8d7bcdfaacc83129f005dede11b1 < fd89d92c1140cee8f59de336cb37fa65e359c123 ; affected f6f50e28f0cb8d7bcdfaacc83129f005dede11b1 < 703b2c7e0798d263154dc8593dc2345f75dc077f ; affected f6f50e28f0cb8d7bcdfaacc83129f005dede11b1 < bf605ae98dab5c15c5b631d4d7f88898cb41b649 ; affected f6f50e28f0cb8d7bcdfaacc83129f005dede11b1 < ff55291fb36779819211b596da703389135f5b05 ; affected f6f50e28f0cb8d7bcdfaacc83129f005dede11b1 < 82dfdd1e31e774578f76ce6dc90c834f96403a0f ; affected f6f50e28f0cb8d7bcdfaacc83129f005dede11b1 < 86a89e75e9e4dfa768b97db466ad6bedf2e7ea5b
Linux · Linuxaffected 2.6.32 ; unaffected 0 < 2.6.32 ; unaffected 4.19.323 ≤ 4.19.* ; unaffected 5.4.285 ≤ 5.4.* ; unaffected 5.10.227 ≤ 5.10.* ; unaffected 5.15.168 ≤ 5.15.*

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD