]> git.ipfire.org Git - thirdparty/linux.git/commit
net: ethtool: avoid OOB accesses in PAUSE_SET
authorJakub Kicinski <kuba@kernel.org>
Thu, 26 Jun 2025 23:39:26 +0000 (16:39 -0700)
committerJakub Kicinski <kuba@kernel.org>
Mon, 30 Jun 2025 15:32:37 +0000 (08:32 -0700)
commit99e3eb454cc48b9f2691256780aeb247bdc0ee3d
tree0fe35ba2fb1fe767d146e9db0e8f4ecce77e3e1e
parent7012d4f3c7a82008113974108bf0c9c0553b424a
net: ethtool: avoid OOB accesses in PAUSE_SET

We now reuse .parse_request() from GET on SET, so we need to make sure
that the policies for both cover the attributes used for .parse_request().
genetlink will only allocate space in info->attrs for ARRAY_SIZE(policy).

Reported-by: syzbot+430f9f76633641a62217@syzkaller.appspotmail.com
Fixes: 963781bdfe20 ("net: ethtool: call .parse_request for SET handlers")
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20250626233926.199801-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ethtool/netlink.h
net/ethtool/pause.c