android_kernel_xiaomi_sm8350/drivers/net
Ralf Baechle 3eb0027594 NET: Fix possible corruption in bpqether driver
The bpq ether driver is modifying the data art of the skb by first
dropping the KISS byte (a command byte for the radio) then prepending the
length + 4 of the remaining AX.25 packet to be transmitted as a little
endian 16-bit number.  If the high byte of the length has a different
value than the dropped KISS byte users of clones of the skb may observe
this as corruption.  This was observed with by running listen(8) -a which
uses a packet socket which clones transmit packets.  The corruption will
then typically be displayed for as a KISS "TX Delay" command for AX.25
packets in the range of 252..508 bytes or any other KISS command for
yet larger packets.

Fixed by using skb_cow to create a private copy should the skb be cloned.
Using skb_cow also allows us to cleanup the old logic to ensure sufficient
headroom in the skb.

While at it, replace a return of 0 from bpq_xmit with the proper constant
NETDEV_TX_OK which is now being used everywhere else in this function.

Affected: all 2.2, 2.4 and 2.6 kernels.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Reported-by: Jann Traschewski <jann@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-02 23:45:58 -07:00
..
appletalk appletalk: convert drivers to netdev_tx_t 2009-09-01 01:13:55 -07:00
arcnet netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
arm drivers: Kill now superfluous ->last_rx stores 2009-09-02 23:07:36 -07:00
atl1c drivers: Kill now superfluous ->last_rx stores 2009-09-02 23:07:36 -07:00
atl1e netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
atlx netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
benet drivers: Kill now superfluous ->last_rx stores 2009-09-02 23:07:36 -07:00
bonding bonding: use compare_ether_addr_64bits() in ALB 2009-09-01 17:40:26 -07:00
can drivers: Kill now superfluous ->last_rx stores 2009-09-02 23:07:36 -07:00
chelsio netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
cris
cxgb3 netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
e1000 e1000: Fix for e1000 kills IPMI on a tagged vlan. 2009-09-01 17:40:11 -07:00
e1000e Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
ehea
enic netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
fs_enet
hamradio NET: Fix possible corruption in bpqether driver 2009-09-02 23:45:58 -07:00
ibm_newemac Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
igb netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
igbvf drivers: Kill now superfluous ->last_rx stores 2009-09-02 23:07:36 -07:00
irda Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
ixgb intel: convert drivers to netdev_tx_t 2009-09-01 01:13:52 -07:00
ixgbe ixgbe: Patch to fix 82599 multispeed fiber link issues when driver is loaded without any cable and reconnecting it to 1G partner 2009-09-01 17:40:20 -07:00
ixp2000 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
mlx4 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
myri10ge netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
netxen netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
pcmcia netdev: convert pcmcia drivers to netdev_tx_t 2009-09-01 01:13:34 -07:00
phy broadcom: Make the 57780 IEEE compliant 2009-08-26 15:48:06 -07:00
qlge netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
sfc netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
skfp netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
tokenring tokenring: convert to netdev_tx_t 2009-09-01 01:13:26 -07:00
tulip Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
usb netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
vxge drivers: Kill now superfluous ->last_rx stores 2009-09-02 23:07:36 -07:00
wan wan: convert drivers to netdev_tx_t 2009-09-01 01:13:28 -07:00
wimax wireless: convert drivers to netdev_tx_t 2009-09-01 01:14:04 -07:00
wireless drivers: Kill now superfluous ->last_rx stores 2009-09-02 23:07:36 -07:00
3c59x.c 3com: convert drivers to netdev_tx_t 2009-09-01 01:13:50 -07:00
3c501.c 3com: convert drivers to netdev_tx_t 2009-09-01 01:13:50 -07:00
3c501.h 3com: convert drivers to netdev_tx_t 2009-09-01 01:13:50 -07:00
3c503.c WARNING: some request_irq() failures ignored in el2_open() 2009-09-02 23:45:54 -07:00
3c503.h
3c505.c 3com: convert drivers to netdev_tx_t 2009-09-01 01:13:50 -07:00
3c505.h
3c507.c 3com: convert drivers to netdev_tx_t 2009-09-01 01:13:50 -07:00
3c509.c 3com: convert drivers to netdev_tx_t 2009-09-01 01:13:50 -07:00
3c515.c 3com: convert drivers to netdev_tx_t 2009-09-01 01:13:50 -07:00
3c523.c 3com: convert drivers to netdev_tx_t 2009-09-01 01:13:50 -07:00
3c523.h
3c527.c 3com: convert drivers to netdev_tx_t 2009-09-01 01:13:50 -07:00
3c527.h
7990.c
7990.h
8139cp.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
8139too.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
8390.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
8390.h netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
8390p.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
82596.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
a2065.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
a2065.h
ac3200.c
acenic.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
acenic.h netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
amd8111e.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
amd8111e.h
apne.c
ariadne.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
ariadne.h
at1700.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
atarilance.c
atp.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
atp.h
au1000_eth.c au1000_eth: possible NULL dereference of aup->mii_bus->irq in au1000_probe() 2009-09-01 17:40:56 -07:00
au1000_eth.h
ax88796.c
b44.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
b44.h
bfin_mac.c netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
bfin_mac.h
bmac.c
bmac.h
bnx2_fw.h
bnx2.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
bnx2.h Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
bnx2x_dump.h
bnx2x_fw_defs.h
bnx2x_fw_file_hdr.h
bnx2x_hsi.h
bnx2x_init_ops.h
bnx2x_init.h
bnx2x_link.c
bnx2x_link.h
bnx2x_main.c netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
bnx2x_reg.h
bnx2x.h
bsd_comp.c
cassini.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
cassini.h
cnic_defs.h
cnic_if.h cnic: Fix locking in init/exit calls. 2009-08-15 18:50:47 -07:00
cnic.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
cnic.h cnic: Fix locking in start/stop calls. 2009-08-15 18:50:44 -07:00
cpmac.c
cs89x0.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
cs89x0.h
davinci_emac.c drivers: Kill now superfluous ->last_rx stores 2009-09-02 23:07:36 -07:00
de600.c
de600.h
de620.c
de620.h
declance.c
defxx.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
defxx.h
depca.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
depca.h
dl2k.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
dl2k.h
dm9000.c
dm9000.h
dnet.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
dnet.h
dummy.c netdev: convert pseudo drivers to netdev_tx_t 2009-09-01 01:13:40 -07:00
e100.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
e2100.c
eepro.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
eexpress.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
eexpress.h
enc28j60_hw.h
enc28j60.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
epic100.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
eql.c netdev: convert pseudo drivers to netdev_tx_t 2009-09-01 01:13:40 -07:00
es3210.c
eth16i.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
ethoc.c drivers: Kill now superfluous ->last_rx stores 2009-09-02 23:07:36 -07:00
ewrk3.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
ewrk3.h
fealnx.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
fec_mpc52xx_phy.c
fec_mpc52xx.c drivers/net: fixed drivers that support netpoll use ndo_start_xmit() 2009-08-23 19:51:03 -07:00
fec_mpc52xx.h
fec.c
fec.h
forcedeth.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
fsl_pq_mdio.c
fsl_pq_mdio.h
gianfar_ethtool.c
gianfar_sysfs.c
gianfar.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
gianfar.h
hamachi.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
hp100.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
hp100.h
hp-plus.c
hp.c
hplance.c
hplance.h
hydra.c
ibmlana.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
ibmlana.h
ibmveth.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
ibmveth.h
ifb.c netdev: convert pseudo drivers to netdev_tx_t 2009-09-01 01:13:40 -07:00
ioc3-eth.c
ipg.c netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
ipg.h
isa-skeleton.c
iseries_veth.c
jazzsonic.c
jme.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
jme.h
Kconfig Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
korina.c netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
ks8842.c netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
ks8851.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
ks8851.h
lance.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
lasi_82596.c
lib8390.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
lib82596.c
LICENSE.SRC
ll_temac_main.c
ll_temac_mdio.c
ll_temac.h
lne390.c
loopback.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
lp486e.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
mac89x0.c
mac8390.c
macb.c netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
macb.h
mace.c
mace.h
macmace.c
macsonic.c
macvlan.c macvlan: Use compare_ether_addr_64bits() 2009-09-01 17:40:25 -07:00
Makefile net: add Xilinx emac lite device driver 2009-08-20 02:52:16 -07:00
mdio.c mdio: Check MDIO_STAT1_FAULT in mdio45_links_ok() 2009-08-26 17:38:53 -07:00
meth.c
meth.h
mii.c
mipsnet.c
mv643xx_eth.c
mvme147.c
myri_sbus.c
myri_sbus.h
natsemi.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
ne2.c
ne2k-pci.c
ne3210.c
ne-h8300.c
ne.c
netconsole.c
netx-eth.c
ni52.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
ni52.h
ni65.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
ni65.h
ni5010.c
ni5010.h
niu.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
niu.h
ns83820.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
pasemi_mac_ethtool.c
pasemi_mac.c
pasemi_mac.h
pci-skeleton.c
pcnet32.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
plip.c
ppp_async.c
ppp_deflate.c
ppp_generic.c netdev: convert pseudo drivers to netdev_tx_t 2009-09-01 01:13:40 -07:00
ppp_mppe.c
ppp_mppe.h
ppp_synctty.c
pppoe.c
pppol2tp.c
pppox.c
ps3_gelic_net.c netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
ps3_gelic_net.h
ps3_gelic_wireless.c netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
ps3_gelic_wireless.h
qla3xxx.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
qla3xxx.h
r6040.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
r8169.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
rionet.c
rrunner.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
rrunner.h netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
s2io-regs.h
s2io.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
s2io.h s2io: Generate complete messages using single line DBG_PRINTs 2009-08-30 22:35:11 -07:00
s6gmac.c
sb1000.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
sb1250-mac.c
sc92031.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
seeq8005.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
seeq8005.h
sgiseeq.c
sgiseeq.h
sh_eth.c net: sh_eth: add value of ether_link pin in platform_data 2009-08-29 00:19:35 -07:00
sh_eth.h net: sh_eth: add value of ether_link pin in platform_data 2009-08-29 00:19:35 -07:00
sis190.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
sis900.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
sis900.h
skge.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
skge.h
sky2.c sky2: Use 32bit read to read Y2_VAUX_AVAIL 2009-09-01 17:40:44 -07:00
sky2.h sky2: Use 32bit read to read Y2_VAUX_AVAIL 2009-09-01 17:40:44 -07:00
slhc.c
slip.c netdev: convert pseudo drivers to netdev_tx_t 2009-09-01 01:13:40 -07:00
slip.h
smc91x.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
smc91x.h
smc911x.c
smc911x.h
smc9194.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
smc9194.h
smc-mca.c
smc-ultra32.c
smc-ultra.c
smsc911x.c drivers: Kill now superfluous ->last_rx stores 2009-09-02 23:07:36 -07:00
smsc911x.h
smsc9420.c drivers: Kill now superfluous ->last_rx stores 2009-09-02 23:07:36 -07:00
smsc9420.h
sni_82596.c
sonic.c
sonic.h
Space.c
spider_net_ethtool.c
spider_net.c
spider_net.h
starfire.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
stnic.c
sun3_82586.c
sun3_82586.h
sun3lance.c
sunbmac.c
sunbmac.h
sundance.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
sungem_phy.c
sungem_phy.h
sungem.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
sungem.h
sunhme.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
sunhme.h
sunlance.c
sunqe.c
sunqe.h
sunvnet.c
sunvnet.h
tc35815.c
tehuti.c netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
tehuti.h
tg3.c tg3: Update version to 3.102 2009-09-02 00:44:11 -07:00
tg3.h tg3: Add MDIO bus address assignments 2009-09-02 00:44:09 -07:00
tlan.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
tlan.h
tsi108_eth.c
tsi108_eth.h
tun.c tun: reuse struct sock fields 2009-09-01 17:40:33 -07:00
typhoon.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
typhoon.h
ucc_geth_ethtool.c ucc_geth: Implement suspend/resume and Wake-On-LAN support 2009-08-30 21:51:47 -07:00
ucc_geth.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
ucc_geth.h ucc_geth: Implement suspend/resume and Wake-On-LAN support 2009-08-30 21:51:47 -07:00
veth.c netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
via-rhine.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
via-velocity.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
via-velocity.h
virtio_net.c netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
wd.c
xen-netfront.c netdev: drivers should make ethtool_ops const 2009-09-02 01:03:33 -07:00
xilinx_emaclite.c drivers: Kill now superfluous ->last_rx stores 2009-09-02 23:07:36 -07:00
xtsonic.c
yellowfin.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
znet.c netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
zorro8390.c