linux-yocto/tools/net/ynl
David Wei 4e3401aa6e tools: ynl-gen: validate 0 len strings from kernel
[ Upstream commit 4720f9707c783f642332dee3d56dccaefa850e42 ]

Strings from the kernel are guaranteed to be null terminated and
ynl_attr_validate() checks for this. But it doesn't check if the string
has a len of 0, which would cause problems when trying to access
data[len - 1]. Fix this by checking that len is positive.

Signed-off-by: David Wei <dw@davidwei.uk>
Link: https://patch.msgid.link/20250503043050.861238-1-dw@davidwei.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:42:16 +02:00
..
generated netlink: specs: devlink: fix reply command values 2023-10-13 17:27:27 -07:00
lib tools: ynl-gen: validate 0 len strings from kernel 2025-06-04 14:42:16 +02:00
samples ynl: print xdp-zc-max-segs in the sample 2023-07-28 09:33:12 -07:00
cli.py tools/net/ynl: Add support for create flags 2023-08-27 17:17:10 -07:00
ethtool.py tools/net/ynl: ethtool: fix crash when Hardware Clock info is missing 2025-05-22 14:12:16 +02:00
Makefile ynl: regenerate all headers 2023-07-28 09:33:12 -07:00
Makefile.deps tools: ynl: improve the direct-include header guard logic 2023-06-22 19:47:02 -07:00
requirements.txt tools: ynl: add the Python requirements.txt file 2023-03-24 19:11:02 -07:00
ynl-gen-c.py tools: ynl: fix setting presence bits in simple nests 2024-04-10 16:35:41 +02:00
ynl-regen.sh ynl: regenerate all headers 2023-07-28 09:33:12 -07:00