android_kernel_motorola_sm6375/drivers/net
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nathan Chancellor e390838eef hamradio: baycom_epp: Fix return type of baycom_send_packet()
[ Upstream commit c5733e5b15d91ab679646ec3149e192996a27d5d ]

With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG),
indirect call targets are validated against the expected function
pointer prototype to make sure the call target is valid to help mitigate
ROP attacks. If they are not identical, there is a failure at run time,
which manifests as either a kernel panic or thread getting killed. A
proposed warning in clang aims to catch these at compile time, which
reveals:

  drivers/net/hamradio/baycom_epp.c:1119:25: error: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Werror,-Wincompatible-function-pointer-types-strict]
          .ndo_start_xmit      = baycom_send_packet,
                                ^~~~~~~~~~~~~~~~~~
  1 error generated.

->ndo_start_xmit() in 'struct net_device_ops' expects a return type of
'netdev_tx_t', not 'int'. Adjust the return type of baycom_send_packet()
to match the prototype's to resolve the warning and CFI failure.

Link: https://github.com/ClangBuiltLinux/linux/issues/1750
Signed-off-by: Nathan Chancellor <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2023-01-18 11:41:35 +01:00
..
appletalk
arcnet
bonding bonding: uninitialized variable in bond_miimon_inspect() 2023-01-18 11:41:08 +01:00
caif
can can: tcan4x5x: Remove invalid write in clear_interrupts 2023-01-18 11:41:15 +01:00
dsa net: lan9303: Fix read error execution path 2023-01-18 11:41:15 +01:00
ethernet net: ethernet: ti: Fix return type of netcp_ndo_start_xmit() 2023-01-18 11:41:35 +01:00
fddi net: defxx: Fix missing err handling in dfx_init() 2023-01-18 11:41:13 +01:00
fjes
hamradio hamradio: baycom_epp: Fix return type of baycom_send_packet() 2023-01-18 11:41:35 +01:00
hippi
hyperv hv_netvsc: Fix race between VF offering and VF association message from host 2022-10-29 10:20:36 +02:00
ieee802154 ca8210: Fix crash by zero initializing data 2022-12-14 11:30:44 +01:00
ipvlan ipvlan: Fix out-of-bound bugs caused by unset skb->mac_header 2022-09-28 11:04:05 +02:00
netdevsim netdevsim: Avoid allocation warnings triggered from user space 2022-08-25 11:17:49 +02:00
phy net: phy: fix null-ptr-deref while probe() failed 2022-12-08 11:23:03 +01:00
plip net: plip: don't call kfree_skb/dev_kfree_skb() under spin_lock_irq() 2022-12-14 11:30:48 +01:00
ppp
slip
team net: team: Unsync device addresses on ndo_stop 2022-09-28 11:04:05 +02:00
usb net: usb: qmi_wwan: add u-blox 0x1342 composition 2022-12-14 11:30:42 +01:00
vmxnet3
wan net: farsync: Fix kmemleak when rmmods farsync 2023-01-18 11:41:14 +01:00
wimax
wireless wifi: ar5523: Fix use-after-free on ar5523_cmd() timed out 2023-01-18 11:41:35 +01:00
xen-netback xen-netback: move removal of "hotplug-status" to the right place 2023-01-18 11:40:48 +01:00
dummy.c
eql.c
geneve.c geneve: do not use RT_TOS for IPv6 flowlabel 2022-08-25 11:18:24 +02:00
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c net: loopback: use NET_NAME_PREDICTABLE for name_assign_type 2023-01-18 11:40:49 +01:00
macsec.c
macvlan.c macvlan: enforce a consistent minimal mtu 2022-11-25 17:42:21 +01:00
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c ntb_netdev: Use dev_kfree_skb_any() in interrupt context 2023-01-18 11:41:16 +01:00
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c net: thunderbolt: Fix error handling in tbnet_init() 2022-11-25 17:42:16 +01:00
tun.c net: tun: Fix use-after-free in tun_detach() 2022-12-08 11:23:03 +01:00
veth.c
virtio_net.c virtio-net: fix the race between refill work and close 2022-08-03 11:59:41 +02:00
vrf.c
vsockmon.c
vxlan.c
xen-netfront.c xen-netfront: Fix NULL sring after live migration 2022-12-14 11:30:45 +01:00