CVE-2024-42257

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-42257
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-42257.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-42257
Downstream
Published
2024-08-08T08:50:37Z
Modified
2025-10-17T09:53:47.027800Z
Summary
ext4: use memtostr_pad() for s_volume_name
Details

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

ext4: use memtostrpad() for svolume_name

As with the other strings in struct ext4superblock, svolumename is not NUL terminated. The other strings were marked in commit 072ebb3bffe6 ("ext4: add nonstring annotations to ext4.h"). Using strscpy() isn't the right replacement for strncpy(); it should use memtostr_pad() instead.

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
744a56389f7398f286231e062c2e63f0de01bcc6
Fixed
4378be89ddb7de88d984b67ecfd6191686c42817
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
744a56389f7398f286231e062c2e63f0de01bcc6
Fixed
be27cd64461c45a6088a91a04eba5cd44e1767ef

Affected versions

v6.*

v6.10
v6.10-rc1
v6.10-rc2
v6.10-rc3
v6.10-rc4
v6.10-rc5
v6.10-rc6
v6.10-rc7
v6.9
v6.9-rc5
v6.9-rc6
v6.9-rc7

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.10.0
Fixed
6.10.1