Re: [syzbot] [net?] general protection fault in generic_hwtstamp_ioctl_lower (2)

From: Hillf Danton
Date: Wed Feb 05 2025 - 06:02:15 EST


On Tue, 04 Feb 2025 07:22:16 -0800
> syzbot found the following issue on:
>
> HEAD commit: 69e858e0b8b2 Merge tag 'uml-for-linus-6.14-rc1' of git://g..
> git tree: upstream
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=161595f8580000

#syz test upstream master

--- x/net/core/dev_ioctl.c
+++ y/net/core/dev_ioctl.c
@@ -452,6 +452,8 @@ static int generic_hwtstamp_ioctl_lower(
struct ifreq ifrr;
int err;

+ if (!kernel_cfg->ifr)
+ return -ENODEV;
strscpy_pad(ifrr.ifr_name, dev->name, IFNAMSIZ);
ifrr.ifr_ifru = kernel_cfg->ifr->ifr_ifru;

--