diff options
| author | 2026-04-08 15:08:52 +0800 | |
|---|---|---|
| committer | 2026-04-12 11:23:50 -0700 | |
| commit | 1346586a9ac96588eff586ca1893dd2e88b88510 (patch) | |
| tree | f99bc4b659d69e1abb88a937830ec4716a919ed3 /include/linux/amba/ssh:/git@git.zx2c4.com | |
| parent | tools: ynl: ethtool: add --dbg-small-recv option (diff) | |
netlink: add a nla_nest_end_safe() helper
The nla_len field in struct nlattr is a __u16, which can only hold
values up to 65535. If a nested attribute grows beyond this limit,
nla_nest_end() silently truncates the length, producing a corrupted
netlink message with no indication of the problem.
Since nla_nest_end() is used everywhere and this issue rarely happens,
let's add a new helper to check the length.
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://patch.msgid.link/20260408-b4-ynl_ethtool-v2-4-7623a5e8f70b@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/amba/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
