CVE-2024-40951

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-40951
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-40951.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-40951
Downstream
Published
2024-07-12T12:31:55Z
Modified
2025-10-21T23:51:57.708697Z
Summary
ocfs2: fix NULL pointer dereference in ocfs2_abort_trigger()
Details

In the Linux kernel, the following vulnerability has been resolved:

ocfs2: fix NULL pointer dereference in ocfs2aborttrigger()

bdev->bdsuper has been removed and commit 8887b94d9322 change the usage from bdev->bdsuper to bassocmap->host->isb. Since ocfs2 hasn't set bh->bassocmap, it will trigger NULL pointer dereference when calling into ocfs2abort_trigger().

Actually this was pointed out in history, see commit 74e364ad1b13. But I've made a mistake when reviewing commit 8887b94d9322 and then re-introduce this regression.

Since we cannot revive bdev in buffer head, so fix this issue by initializing all types of ocfs2 triggers when fill super, and then get the specific ocfs2 trigger from ocfs2cachinginfo when access journal.

[joseph.qi@linux.alibaba.com: v2]

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
8887b94d93224e0ef7e1bc6369640e313b8b12f4
Fixed
67bcecd780609f471260a8c83fb0ae15f27734ce
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
8887b94d93224e0ef7e1bc6369640e313b8b12f4
Fixed
eb63357ef229fae061ce7ce2839d558681c42f1a
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
8887b94d93224e0ef7e1bc6369640e313b8b12f4
Fixed
685d03c3795378fca6a1b3d43581f7f1a3fc095f

Affected versions

v6.*

v6.10-rc1
v6.10-rc2
v6.10-rc3
v6.5
v6.5-rc2
v6.5-rc3
v6.5-rc4
v6.5-rc5
v6.5-rc6
v6.5-rc7
v6.6
v6.6-rc1
v6.6-rc2
v6.6-rc3
v6.6-rc4
v6.6-rc5
v6.6-rc6
v6.6-rc7
v6.6.1
v6.6.10
v6.6.11
v6.6.12
v6.6.13
v6.6.14
v6.6.15
v6.6.16
v6.6.17
v6.6.18
v6.6.19
v6.6.2
v6.6.20
v6.6.21
v6.6.22
v6.6.23
v6.6.24
v6.6.25
v6.6.26
v6.6.27
v6.6.28
v6.6.29
v6.6.3
v6.6.30
v6.6.31
v6.6.32
v6.6.33
v6.6.34
v6.6.35
v6.6.4
v6.6.5
v6.6.6
v6.6.7
v6.6.8
v6.6.9
v6.7
v6.7-rc1
v6.7-rc2
v6.7-rc3
v6.7-rc4
v6.7-rc5
v6.7-rc6
v6.7-rc7
v6.7-rc8
v6.8
v6.8-rc1
v6.8-rc2
v6.8-rc3
v6.8-rc4
v6.8-rc5
v6.8-rc6
v6.8-rc7
v6.9
v6.9-rc1
v6.9-rc2
v6.9-rc3
v6.9-rc4
v6.9-rc5
v6.9-rc6
v6.9-rc7
v6.9.1
v6.9.2
v6.9.3
v6.9.4
v6.9.5
v6.9.6

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.6.0
Fixed
6.6.36
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.9.7