mbox series

[net,0/6] wireguard fixes for 6.9-rc1

Message ID 20240314224911.6653-1-Jason@zx2c4.com (mailing list archive)
Headers show
Series wireguard fixes for 6.9-rc1 | expand

Message

Jason A. Donenfeld March 14, 2024, 10:49 p.m. UTC
Hey netdev,

This series has four WireGuard fixes:

1) Annotate a data race that KCSAN found by using READ_ONCE/WRITE_ONCE,
   which has been causing syzkaller noise.

2) Use the generic netdev tstats allocation and stats getters instead of
   doing this within the driver.

3) Explicitly check a flag variable instead of an empty list in the
   netlink code, to prevent a UaF situation when paging through GET
   results during a remove-all SET operation.

4) Set a flag in the RISC-V CI config so the selftests continue to boot.

Please apply these!

Thanks,
Jason


Breno Leitao (2):
  wireguard: device: leverage core stats allocator
  wireguard: device: remove generic .ndo_get_stats64

Jason A. Donenfeld (3):
  wireguard: netlink: check for dangling peer via is_dead instead of
    empty list
  wireguard: netlink: access device through ctx instead of peer
  wireguard: selftests: set RISCV_ISA_FALLBACK on riscv{32,64}

Nikita Zhandarovich (1):
  wireguard: receive: annotate data-race around
    receiving_counter.counter

 drivers/net/wireguard/device.c                        | 11 ++---------
 drivers/net/wireguard/netlink.c                       | 10 +++++-----
 drivers/net/wireguard/receive.c                       |  6 +++---
 .../selftests/wireguard/qemu/arch/riscv32.config      |  1 +
 .../selftests/wireguard/qemu/arch/riscv64.config      |  1 +
 5 files changed, 12 insertions(+), 17 deletions(-)

Comments

Jiri Pirko March 18, 2024, 11:31 a.m. UTC | #1
Thu, Mar 14, 2024 at 11:49:05PM CET, Jason@zx2c4.com wrote:
>Hey netdev,
>
>This series has four WireGuard fixes:
>
>1) Annotate a data race that KCSAN found by using READ_ONCE/WRITE_ONCE,
>   which has been causing syzkaller noise.
>
>2) Use the generic netdev tstats allocation and stats getters instead of
>   doing this within the driver.
>
>3) Explicitly check a flag variable instead of an empty list in the
>   netlink code, to prevent a UaF situation when paging through GET
>   results during a remove-all SET operation.
>
>4) Set a flag in the RISC-V CI config so the selftests continue to boot.
>
>Please apply these!
>
>Thanks,
>Jason
>
>
>Breno Leitao (2):
>  wireguard: device: leverage core stats allocator
>  wireguard: device: remove generic .ndo_get_stats64
>
>Jason A. Donenfeld (3):
>  wireguard: netlink: check for dangling peer via is_dead instead of
>    empty list
>  wireguard: netlink: access device through ctx instead of peer
>  wireguard: selftests: set RISCV_ISA_FALLBACK on riscv{32,64}
>
>Nikita Zhandarovich (1):
>  wireguard: receive: annotate data-race around
>    receiving_counter.counter

Looks fine to me.

set-
Reviewed-by: Jiri Pirko <jiri@nvidia.com>



>
> drivers/net/wireguard/device.c                        | 11 ++---------
> drivers/net/wireguard/netlink.c                       | 10 +++++-----
> drivers/net/wireguard/receive.c                       |  6 +++---
> .../selftests/wireguard/qemu/arch/riscv32.config      |  1 +
> .../selftests/wireguard/qemu/arch/riscv64.config      |  1 +
> 5 files changed, 12 insertions(+), 17 deletions(-)
>
>-- 
>2.44.0
>
>
patchwork-bot+netdevbpf@kernel.org March 19, 2024, 10:30 a.m. UTC | #2
Hello:

This series was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Thu, 14 Mar 2024 16:49:05 -0600 you wrote:
> Hey netdev,
> 
> This series has four WireGuard fixes:
> 
> 1) Annotate a data race that KCSAN found by using READ_ONCE/WRITE_ONCE,
>    which has been causing syzkaller noise.
> 
> [...]

Here is the summary with links:
  - [net,1/6] wireguard: receive: annotate data-race around receiving_counter.counter
    https://git.kernel.org/netdev/net/c/bba045dc4d99
  - [net,2/6] wireguard: device: leverage core stats allocator
    https://git.kernel.org/netdev/net/c/db2952dfbdf1
  - [net,3/6] wireguard: device: remove generic .ndo_get_stats64
    https://git.kernel.org/netdev/net/c/df9bbb5e776a
  - [net,4/6] wireguard: netlink: check for dangling peer via is_dead instead of empty list
    https://git.kernel.org/netdev/net/c/55b6c7386738
  - [net,5/6] wireguard: netlink: access device through ctx instead of peer
    https://git.kernel.org/netdev/net/c/71cbd32e3db8
  - [net,6/6] wireguard: selftests: set RISCV_ISA_FALLBACK on riscv{32,64}
    https://git.kernel.org/netdev/net/c/e995f5dd9a9c

You are awesome, thank you!