lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <84f45a7d-92b6-4dc5-d7a1-072152fab6ff@tessares.net>
Date:   Thu, 22 Sep 2022 10:04:55 +0200
From:   Matthieu Baerts <matthieu.baerts@...sares.net>
To:     Marc Kleine-Budde <mkl@...gutronix.de>, netdev@...r.kernel.org
Cc:     davem@...emloft.net, kuba@...nel.org, linux-can@...r.kernel.org,
        kernel@...gutronix.de, MPTCP Upstream <mptcp@...ts.linux.dev>
Subject: Re: [PATCH net 2/3] can: gs_usb: gs_can_open(): fix race
 dev->can.state condition

Hello,

On 21/09/2022 10:36, Marc Kleine-Budde wrote:
> The dev->can.state is set to CAN_STATE_ERROR_ACTIVE, after the device
> has been started. On busy networks the CAN controller might receive
> CAN frame between and go into an error state before the dev->can.state
> is assigned.
> 
> Assign dev->can.state before starting the controller to close the race
> window.
> 
> Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices")
> Link: https://lore.kernel.org/all/20220920195216.232481-1-mkl@pengutronix.de
> Signed-off-by: Marc Kleine-Budde <mkl@...gutronix.de>

FYI, we got a small conflict when merging -net in net-next in the MPTCP
tree due to this patch applied in -net:

  5440428b3da6 ("can: gs_usb: gs_can_open(): fix race dev->can.state
condition")

and this one from net-next:

  45dfa45f52e6 ("can: gs_usb: add RX and TX hardware timestamp support")

The conflict has been resolved on our side[1] and the resolution we
suggest is attached to this email.

Cheers,
Matt

[1] https://github.com/multipath-tcp/mptcp_net-next/commit/671f1521b564
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
View attachment "671f1521b5648e99fb55bbd0f114e4433551d411.patch" of type "text/x-patch" (1001 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ