CVE-2024-35878
Assigner: Linux
Published: 2024-05-19T08:34:35.622Z
State: PUBLISHED
descriptions: value: In the Linux kernel, the following vulnerability has been resolved:

of: module: prevent NULL pointer dereference in vsnprintf()

In of_modalias(), we can get passed the str and len parameters which would
cause a kernel oops in vsnprintf() since it only allows passing a NULL ptr
when the length is also 0. Also, we need to filter out the negative values
of the len parameter as these will result in a really huge buffer since
snprintf() takes size_t parameter while ours is ssize_t...

Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.
affected: product: Linux
vendor: Linux
defaultStatus: unaffected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions: version: 1da177e4c3f4
lessThan: e4a449368a2c
status: affected
versionType: git
version: 1da177e4c3f4
lessThan: 544561dc56f7
status: affected
versionType: git
version: 1da177e4c3f4
lessThan: a1aa5390cc91
status: affected
versionType: git
product: Linux
vendor: Linux
defaultStatus: affected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions: version: 6.6.26
lessThanOrEqual: 6.6.*
status: unaffected
versionType: custom
version: 6.8.5
lessThanOrEqual: 6.8.*
status: unaffected
versionType: custom
version: 6.9
lessThanOrEqual: *
status: unaffected
versionType: original_commit_for_fix
title: of: module: prevent NULL pointer dereference in vsnprintf()
x_generator: engine: bippy-d175d3acf727