Re: [PATCH] net: dev_addr_list: add address length validation in __hw_addr_insert function
From: Suchit K <hidden>
Date: 2025-02-17 19:28:04
Also in:
linux-kernel-mentees, lkml
From: Suchit K <hidden>
Date: 2025-02-17 19:28:04
Also in:
linux-kernel-mentees, lkml
Thank you so much for the feedback. I appreciate your time and effort in reviewing and providing feedback. On Tue, 18 Feb 2025 at 00:51, Eric Dumazet [off-list ref] wrote:
On Mon, Feb 17, 2025 at 8:05 PM Suchit K [off-list ref] wrote:quoted
Hi Eric, Thanks for the feedback! I'm new to kernel development and still finding my way around. I wasn't working from a syzbot report on this one; I was just exploring the code and felt there is no parameter validation. I went ahead and made this change based on that impression. I realized my changelog should have been more generic. Sorry about that. Also since it's not based on a syzbot report, is it good to have this change? Your insights and suggestions would be most welcome. I will make the required changes accordingly. Thanks.I think these checks are not necessary. 1) The caller (dev_addr_mod) provides non NULL pointers, there is no point adding tests, because if one of them was NULL, a crash would occur before hitting this function. 2) Your patch would silently hide a real issue if for some reason dev->addr_len was too big.