CVE-2024-49957
JSON

5.5medium

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

Severity
5.5medium CVSS:3.1 by NVD
Exploit likelihood
0.25% (higher than 17% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

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.

Affected

Product or packageVersionsReported by
Linux Linuxfrom f6f50e28f0cb8d7bcdfaacc83129f005dede11b1 before fd89d92c1140cee8f59de336cb37fa65e359c123, from f6f50e28f0cb8d7bcdfaacc83129f005dede11b1 before 703b2c7e0798d263154dc8593dc2345f75dc077f, from f6f50e28f0cb8d7bcdfaacc83129f005dede11b1 before bf605ae98dab5c15c5b631d4d7f88898cb41b649, from f6f50e28f0cb8d7bcdfaacc83129f005dede11b1 before ff55291fb36779819211b596da703389135f5b05, from f6f50e28f0cb8d7bcdfaacc83129f005dede11b1 before 82dfdd1e31e774578f76ce6dc90c834f96403a0f, from f6f50e28f0cb8d7bcdfaacc83129f005dede11b1 before 86a89e75e9e4dfa768b97db466ad6bedf2e7ea5b, from f6f50e28f0cb8d7bcdfaacc83129f005dede11b1 before f60e94a83db799bde625ac8671a5b4a6354e7120, from f6f50e28f0cb8d7bcdfaacc83129f005dede11b1 before 387bf565cc03e2e8c720b8b4798efea4aacb6962 and 2 more
Not affected: before 2.6.32, from 4.19.323 up to 4.19.*, from 5.4.285 up to 5.4.*, from 5.10.227 up to 5.10.*, from 5.15.168 up to 5.15.*, from 6.1.113 up to 6.1.*
CVE List
linux linux_kernelfrom 2.6.32 before 5.10.227, from 5.11 before 5.15.168, from 5.16 before 6.1.113, from 6.2 before 6.6.55, from 6.7 before 6.10.14, from 6.11 before 6.11.3NVD

Classification

CWE-476

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ocfs2: se corrige el error null-ptr-deref cuando falla la carga del diario. Durante el proceso de montaje, si journal_reset() falla debido a que el diario es demasiado corto, entonces provoca que jbd2_journal_load() falle con j_sb_buffer NULL. Posteriormente, ocfs2_journal_shutdown() llama a jbd2_journal_flush()->jbd2_cleanup_journal_tail()-> __jbd2_update_log_tail()->jbd2_journal_update_sb_log_tail() ->lock_buffer(journal->j_sb_buffer), lo que da como resultado un error de desreferencia de puntero nulo. Para resolver este problema, debemos verificar el indicador JBD2_LOADED para asegurarnos de que el diario se cargó correctamente. Además, use journal en lugar de osb->journal directamente para simplificar el código.

References

https://git.kernel.org/stable/c/fd89d92c1140cee8f59de336cb37fa65e359c123
https://git.kernel.org/stable/c/703b2c7e0798d263154dc8593dc2345f75dc077f
https://git.kernel.org/stable/c/bf605ae98dab5c15c5b631d4d7f88898cb41b649patch
https://git.kernel.org/stable/c/ff55291fb36779819211b596da703389135f5b05patch
https://git.kernel.org/stable/c/82dfdd1e31e774578f76ce6dc90c834f96403a0fpatch
https://git.kernel.org/stable/c/86a89e75e9e4dfa768b97db466ad6bedf2e7ea5bpatch
https://git.kernel.org/stable/c/f60e94a83db799bde625ac8671a5b4a6354e7120patch
https://git.kernel.org/stable/c/387bf565cc03e2e8c720b8b4798efea4aacb6962patch
https://git.kernel.org/stable/c/5784d9fcfd43bd853654bb80c87ef293b9e8e80apatch
https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html
https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html

Sources

SourceRecordLicence
CVE ListCVE-2024-49957 changed 2026-05-11CVE Terms of Use
NVDCVE-2024-49957 changed 2026-06-17Public domain