android_kernel_motorola_sm6375/drivers/net
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nikita Zhandarovich abdad2c152
UPSTREAM: wireguard: receive: annotate data-race around receiving_counter.counter
Syzkaller with KCSAN identified a data-race issue when accessing
keypair->receiving_counter.counter. Use READ_ONCE() and WRITE_ONCE()
annotations to mark the data race as intentional.

    BUG: KCSAN: data-race in wg_packet_decrypt_worker / wg_packet_rx_poll

    write to 0xffff888107765888 of 8 bytes by interrupt on cpu 0:
     counter_validate drivers/net/wireguard/receive.c:321 [inline]
     wg_packet_rx_poll+0x3ac/0xf00 drivers/net/wireguard/receive.c:461
     __napi_poll+0x60/0x3b0 net/core/dev.c:6536
     napi_poll net/core/dev.c:6605 [inline]
     net_rx_action+0x32b/0x750 net/core/dev.c:6738
     __do_softirq+0xc4/0x279 kernel/softirq.c:553
     do_softirq+0x5e/0x90 kernel/softirq.c:454
     __local_bh_enable_ip+0x64/0x70 kernel/softirq.c:381
     __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:167 [inline]
     _raw_spin_unlock_bh+0x36/0x40 kernel/locking/spinlock.c:210
     spin_unlock_bh include/linux/spinlock.h:396 [inline]
     ptr_ring_consume_bh include/linux/ptr_ring.h:367 [inline]
     wg_packet_decrypt_worker+0x6c5/0x700 drivers/net/wireguard/receive.c:499
     process_one_work kernel/workqueue.c:2633 [inline]
     ...

    read to 0xffff888107765888 of 8 bytes by task 3196 on cpu 1:
     decrypt_packet drivers/net/wireguard/receive.c:252 [inline]
     wg_packet_decrypt_worker+0x220/0x700 drivers/net/wireguard/receive.c:501
     process_one_work kernel/workqueue.c:2633 [inline]
     process_scheduled_works+0x5b8/0xa30 kernel/workqueue.c:2706
     worker_thread+0x525/0x730 kernel/workqueue.c:2787
     ...

Bug: 254441685
Fixes: a9e90d9931f3 ("wireguard: noise: separate receive counter from send counter")
Reported-by: syzbot+d1de830e4ecdaac83d89@syzkaller.appspotmail.com
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
(cherry picked from commit bba045dc4d996d03dce6fe45726e78a1a1f6d4c3)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I89aa56c54a02d1746759b072981448cc8f056065
2025-09-24 12:16:41 +02:00
..
appletalk
arcnet arcnet: Add NULL check in com20020pci_probe() 2025-04-10 14:29:43 +02:00
bonding bonding: report duplicate MAC address in all situations 2025-06-04 14:32:32 +02:00
caif This is the 5.4.291 stable release 2025-03-13 14:53:52 +00:00
can Merge tag 'ASB-2025-09-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2025-09-12 18:48:05 +03:00
dsa net: dsa: sja1105: discard incoming frames in BR_STATE_LISTENING 2025-06-04 14:32:28 +02:00
ethernet Merge tag 'ASB-2025-09-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2025-09-12 18:48:05 +03:00
fddi
fjes
hamradio
hippi
hyperv hv_netvsc: Fix VF namespace also in synthetic NIC NETDEV_REGISTER event 2024-11-08 16:20:51 +01:00
ieee802154 ieee802154: ca8210: Use proper setters and getters for bitwise types 2025-06-04 14:32:31 +02:00
ipvlan
netdevsim
phy Merge tag 'ASB-2025-09-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2025-09-12 18:48:05 +03:00
plip
ppp net: ppp: Add bound checking for skb data on ppp_sync_txmung 2025-05-02 07:39:09 +02:00
slip slip: make slhc_remember() more robust against malicious packets 2024-11-08 16:20:46 +01:00
team team: better TEAM_OPTION_TYPE_STRING validation 2025-03-13 12:43:12 +01:00
usb Merge tag 'ASB-2025-09-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2025-09-12 18:48:05 +03:00
vmxnet3
wan
wimax
wireguard UPSTREAM: wireguard: receive: annotate data-race around receiving_counter.counter 2025-09-24 12:16:41 +02:00
wireless Merge tag 'ASB-2025-09-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2025-09-12 18:48:05 +03:00
xen-netback net/xen-netback: prevent UAF in xenvif_flush_hash() 2025-02-01 18:18:53 +01:00
dummy.c
eql.c
geneve.c This is the 5.4.291 stable release 2025-03-13 14:53:52 +00:00
gtp.c gtp: Suppress list corruption splat in gtp_net_exit_batch_rtnl(). 2025-03-13 12:43:22 +01:00
ifb.c
Kconfig UPSTREAM: crypto: mips/poly1305 - enable for all MIPS processors 2025-09-24 12:16:39 +02:00
LICENSE.SRC
loopback.c net: loopback: Avoid sending IP packets without an Ethernet header 2025-03-13 12:43:24 +01:00
macsec.c macsec: don't increment counters for an unrelated SA 2024-11-08 16:20:49 +01:00
macvlan.c
macvtap.c
Makefile UPSTREAM: net: WireGuard secure network tunnel 2025-09-24 12:16:34 +02:00
mdio.c
mii.c
net_failover.c
netconsole.c net: netconsole: Disable target before netpoll cleanup 2024-08-19 05:33:35 +02:00
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c tap: add missing verification for short frame 2024-07-27 10:38:33 +02:00
thunderbolt.c
tun.c tun: revert fix group permission check 2025-03-13 12:43:06 +01:00
veth.c
virtio_net.c Merge tag 'android11-5.4.293_r00' into android11-5.4 2025-05-26 03:40:18 -07:00
vrf.c
vsockmon.c
vxlan.c vxlan: Do not treat dst cache initialization errors as fatal 2025-06-27 11:02:55 +01:00
xen-netfront.c xen/netfront: fix crash when removing device 2024-12-19 18:05:05 +01:00