]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netdevsim: prevent bad user input in nsim_dev_health_break_write()
authorEric Dumazet <edumazet@google.com>
Fri, 13 Dec 2024 17:25:18 +0000 (17:25 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2025 12:28:31 +0000 (13:28 +0100)
commitb3a6daaf7cfb2de37b89fd7a5a2ad4ea9aa3e181
treec13d602838094fb535591f7a6afd136a2c19b622
parent6b80924af6216277892d5f091f5bfc7d1265fa28
netdevsim: prevent bad user input in nsim_dev_health_break_write()

[ Upstream commit ee76746387f6233bdfa93d7406990f923641568f ]

If either a zero count or a large one is provided, kernel can crash.

Fixes: 82c93a87bf8b ("netdevsim: implement couple of testing devlink health reporters")
Reported-by: syzbot+ea40e4294e58b0292f74@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/netdev/675c6862.050a0220.37aaf.00b1.GAE@google.com/T/#u
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Joe Damato <jdamato@fastly.com>
Link: https://patch.msgid.link/20241213172518.2415666-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/netdevsim/health.c