]> www.infradead.org Git - nvme.git/commit
net: ethtool: Fix the panic caused by dev being null when dumping coalesce
authorHeng Qi <hengqi@linux.alibaba.com>
Fri, 28 Jun 2024 04:40:18 +0000 (12:40 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Jul 2024 12:43:50 +0000 (13:43 +0100)
commit74d6529b78f7a440a10aa7f4904ca9f27d1d2f3c
tree4937ecd83361c45f8e95f8f913e931a83e17c847
parentf61c72be2dc5880bcba6a467cda5e6059e885eb3
net: ethtool: Fix the panic caused by dev being null when dumping coalesce

syzbot reported a general protection fault caused by a null pointer
dereference in coalesce_fill_reply(). The issue occurs when req_base->dev
is null, leading to an invalid memory access.

This panic occurs if dumping coalesce when no device name is specified.

Fixes: f750dfe825b9 ("ethtool: provide customized dim profile management")
Reported-by: syzbot+e77327e34cdc8c36b7d3@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=e77327e34cdc8c36b7d3
Signed-off-by: Heng Qi <hengqi@linux.alibaba.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ethtool/coalesce.c