linux-stable/drivers/of
Sergey Shtylyov a1aa5390cc 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.

Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/1d211023-3923-685b-20f0-f3f90ea56e1f@omp.ru
Signed-off-by: Rob Herring <robh@kernel.org>
2024-03-27 17:05:07 -05:00
..
unittest-data of: Fix double free in of_parse_phandle_with_args_map 2024-01-09 12:54:02 -06:00
.kunitconfig of: Add KUnit test to confirm DTB is loaded 2024-03-08 12:50:39 -06:00
Kconfig of: Add KUnit test to confirm DTB is loaded 2024-03-08 12:50:39 -06:00
Makefile of: Add KUnit test to confirm DTB is loaded 2024-03-08 12:50:39 -06:00
address.c dma-mapping: don't store redundant offsets 2023-12-15 12:32:42 +01:00
base.c powerpc updates for 6.9 2024-03-15 17:53:48 -07:00
cpu.c of: Move CPU node related functions to their own file 2023-04-13 17:46:34 -05:00
device.c IOMMU Updates for Linux v6.8 2024-01-18 15:16:57 -08:00
dynamic.c of: dynamic: Synchronize of_changeset_destroy() with the devlink removals 2024-03-26 15:32:32 -05:00
empty_root.dts of: Create of_root if no dtb provided by firmware 2024-03-08 12:50:39 -06:00
fdt.c of: Move all FDT reserved-memory handling into of_reserved_mem.c 2024-03-12 09:23:26 -06:00
fdt_address.c
irq.c of/irq: add missing of_node_put() for interrupt parent node 2023-01-18 11:31:42 -06:00
kexec.c arm64, crash: wrap crash dumping code into crash related ifdefs 2024-02-23 17:48:23 -08:00
kobj.c of: make of_node_ktype constant 2023-02-06 11:03:00 -06:00
module.c of: module: prevent NULL pointer dereference in vsnprintf() 2024-03-27 17:05:07 -05:00
of_numa.c of, numa: Fetch empty NUMA node ID from distance map 2021-10-04 13:13:44 -05:00
of_private.h of: Move all FDT reserved-memory handling into of_reserved_mem.c 2024-03-12 09:23:26 -06:00
of_reserved_mem.c of: Move all FDT reserved-memory handling into of_reserved_mem.c 2024-03-12 09:23:26 -06:00
of_test.c of: Add KUnit test to confirm DTB is loaded 2024-03-08 12:50:39 -06:00
overlay.c of: overlay: enable of_overlay_fdt_apply() kerneldoc 2023-11-15 11:37:56 -06:00
pdt.c
platform.c of: Create of_root if no dtb provided by firmware 2024-03-08 12:50:39 -06:00
property.c Driver core changes for 6.9-rc1 2024-03-21 13:34:15 -07:00
resolver.c
unittest.c Devicetree updates for v6.9: 2024-03-15 12:37:59 -07:00