[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20231006103342.GA3112038@pengutronix.de>
Date: Fri, 6 Oct 2023 12:33:42 +0200
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Marc Kleine-Budde <mkl@...gutronix.de>, netdev@...r.kernel.org,
stable@...r.kernel.org, linux-can@...r.kernel.org,
kernel@...gutronix.de, Sili Luo <rootlab@...wei.com>,
davem@...emloft.net
Subject: Re: [PATCH net 1/7] can: j1939: Fix UAF in j1939_sk_match_filter
during setsockopt(SO_J1939_FILTER)
Hi Jakub,
On Thu, Oct 05, 2023 at 09:44:21AM -0700, Jakub Kicinski wrote:
> On Thu, 5 Oct 2023 11:46:33 +0200 Marc Kleine-Budde wrote:
> > Lock jsk->sk to prevent UAF when setsockopt(..., SO_J1939_FILTER, ...)
> > modifies jsk->filters while receiving packets.
>
> Doesn't it potentially introduce sleep in atomic?
>
> j1939_sk_recv_match()
> spin_lock_bh(&priv->j1939_socks_lock);
> j1939_sk_recv_match_one()
> j1939_sk_match_filter()
> lock_sock()
> sleep
Good point! Thank you for the review.
@Sili Luo, can you please take a look at this?
Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists