WSL2-Linux-Kernel/drivers/net/hamradio
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
..
6pack.c convert hamradio drivers to netdev_txreturnt_t 2009-09-01 01:13:12 -07:00
Kconfig Documentation: Fix erroneous "dmascc=" documentation 2007-10-20 00:11:36 +02:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
baycom_epp.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-08-12 17:44:53 -07:00
baycom_par.c Remove multiple KERN_ prefixes from printk formats 2009-07-08 10:30:03 -07:00
baycom_ser_fdx.c Remove multiple KERN_ prefixes from printk formats 2009-07-08 10:30:03 -07:00
baycom_ser_hdx.c Remove multiple KERN_ prefixes from printk formats 2009-07-08 10:30:03 -07:00
bpqether.c NET: Fix possible corruption in bpqether driver 2009-09-02 23:45:58 -07:00
dmascc.c net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functions 2009-07-05 19:16:04 -07:00
hdlcdrv.c convert hamradio drivers to netdev_txreturnt_t 2009-09-01 01:13:12 -07:00
mkiss.c convert hamradio drivers to netdev_txreturnt_t 2009-09-01 01:13:12 -07:00
scc.c convert hamradio drivers to netdev_txreturnt_t 2009-09-01 01:13:12 -07:00
yam.c convert hamradio drivers to netdev_txreturnt_t 2009-09-01 01:13:12 -07:00
z8530.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00