From: Simon Horman <horms@kernel•org>
To: Jeongjun Park <aha310510@gmail•com>
Cc: davem@davemloft•net, edumazet@google•com, kuba@kernel•org,
pabeni@redhat•com, lukma@denx•de, ricardo@marliere•net,
m-karicheri2@ti•com, n.zhandarovich@fintech•ru,
netdev@vger•kernel.org, linux-kernel@vger•kernel.org,
syzbot+02a42d9b1bd395cbcab4@syzkaller•appspotmail.com
Subject: Re: [PATCH net] net: hsr: prevent NULL pointer dereference in hsr_proxy_announce()
Date: Mon, 9 Sep 2024 09:40:17 +0100 [thread overview]
Message-ID: <20240909084017.GT2097826@kernel.org> (raw)
In-Reply-To: <20240907190341.162289-1-aha310510@gmail.com>
On Sun, Sep 08, 2024 at 04:03:41AM +0900, Jeongjun Park wrote:
> In the function hsr_proxy_annouance() added in the previous commit
> 5f703ce5c981 ("net: hsr: Send supervisory frames to HSR network
> with ProxyNodeTable data"), the return value of the hsr_port_get_hsr()
> function is not checked to be a NULL pointer, which causes a NULL
> pointer dereference.
>
> To solve this, we need to add code to check whether the return value
> of hsr_port_get_hsr() is NULL.
>
> Reported-by: syzbot+02a42d9b1bd395cbcab4@syzkaller•appspotmail.com
> Fixes: 5f703ce5c981 ("net: hsr: Send supervisory frames to HSR network with ProxyNodeTable data")
> Signed-off-by: Jeongjun Park <aha310510@gmail•com>
Thanks,
I agree with your analysis; that the cited commit introduced this problem;
and that this is an appropriate solution.
Reviewed-by: Simon Horman <horms@kernel•org>
next prev parent reply other threads:[~2024-09-09 8:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-07 19:03 [PATCH net] net: hsr: prevent NULL pointer dereference in hsr_proxy_announce() Jeongjun Park
2024-09-09 8:40 ` Simon Horman [this message]
2024-09-09 8:58 ` Lukasz Majewski
2024-09-11 2:15 ` Jakub Kicinski
2024-09-11 8:00 ` Lukasz Majewski
2024-09-11 8:21 ` Simon Horman
2024-09-11 14:43 ` Jakub Kicinski
2024-09-11 23:20 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240909084017.GT2097826@kernel.org \
--to=horms@kernel$(echo .)org \
--cc=aha310510@gmail$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=lukma@denx$(echo .)de \
--cc=m-karicheri2@ti$(echo .)com \
--cc=n.zhandarovich@fintech$(echo .)ru \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=ricardo@marliere$(echo .)net \
--cc=syzbot+02a42d9b1bd395cbcab4@syzkaller$(echo .)appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox