summaryrefslogtreecommitdiffstats
path: root/tools/certs
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-01-19 11:01:50 +0000
committerJakub Kicinski <kuba@kernel.org>2023-01-20 17:52:32 -0800
commitf0950402e8c76e7dcb08563f1b4e8000fbc62455 (patch)
treecbe0d67ce4a9b7e8a466f04cd2696bc02c04d476 /tools/certs
parent5deaa98587aca2f0e7605388e89cfa1df4bad5cb (diff)
downloadlinux-f0950402e8c76e7dcb08563f1b4e8000fbc62455.tar.bz2
netlink: prevent potential spectre v1 gadgets
Most netlink attributes are parsed and validated from __nla_validate_parse() or validate_nla() u16 type = nla_type(nla); if (type == 0 || type > maxtype) { /* error or continue */ } @type is then used as an array index and can be used as a Spectre v1 gadget. array_index_nospec() can be used to prevent leaking content of kernel memory to malicious users. This should take care of vast majority of netlink uses, but an audit is needed to take care of others where validation is not yet centralized in core netlink functions. Fixes: bfa83a9e03cf ("[NETLINK]: Type-safe netlink messages/attributes interface") Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://lore.kernel.org/r/20230119110150.2678537-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/certs')
0 files changed, 0 insertions, 0 deletions