[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250506175830.15aefdbb@kernel.org>
Date: Tue, 6 May 2025 17:58:30 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Simon Horman <horms@...nel.org>
Cc: Matt Johnston <matt@...econstruct.com.au>, Jeremy Kerr
<jk@...econstruct.com.au>, "David S. Miller" <davem@...emloft.net>, Eric
Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org,
syzbot+e76d52dadc089b9d197f@...kaller.appspotmail.com,
syzbot+1065a199625a388fce60@...kaller.appspotmail.com
Subject: Re: [PATCH net] net: mctp: Don't access ifa_index when missing
On Tue, 6 May 2025 17:07:53 +0100 Simon Horman wrote:
> > + if (cb->nlh->nlmsg_len >= nlmsg_msg_size(sizeof(*hdr))) {
> > + hdr = nlmsg_data(cb->nlh);
>
> FWIIW, I think the scope of the declaration of hdr can be reduced to this block.
> (Less positive ease, so to speak.)
We wouldn't be able to sizeof(*hdr) if we move it?
I have a different request :) Matt, once this ends up in net-next
(end of this week) could you refactor it to use nlmsg_payload() ?
It doesn't exist in net but this is exactly why it was added.
Powered by blists - more mailing lists