linux-stable/drivers/net/ethernet
Colin Ian King 1e6c22aef2 net: tehuti: don't process data if it has not been copied from userspace
The array data is only populated with valid information from userspace
if cmd != SIOCDEVPRIVATE, other cases the array contains garbage on
the stack. The subsequent switch statement acts on a subcommand in
data[0] which could be any garbage value if cmd is SIOCDEVPRIVATE which
seems incorrect to me.  Instead, just return EOPNOTSUPP for the case
where cmd == SIOCDEVPRIVATE to avoid this issue.

As a side note, I suspect that the original intention of the code
was for this ioctl to work just for cmd == SIOCDEVPRIVATE (and the
current logic is reversed). However, I don't wont to change the current
semantics in case any userspace code relies on this existing behaviour.

Detected by CoverityScan, CID#139647 ("Uninitialized scalar variable")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-19 22:48:02 -07:00
..
3com
8390
adaptec
adi
aeroflex
agere
alacritech
allwinner
alteon
altera
amazon net: ena: update ena driver to version 1.2.0 2017-06-23 14:15:11 -04:00
amd amd-xgbe: fix spelling mistake: "avialable" -> "available" 2017-06-29 15:35:50 -04:00
apm xgene: Don't fail probe, if there is no clk resource for SGMII interfaces 2017-07-13 09:21:15 -07:00
apple
aquantia
arc
atheros net: atl1c: fix spelling mistake: "droppted" -> "dropped" 2017-06-29 12:24:26 -04:00
aurora
broadcom net: bcmgenet: Free skb after last Tx frag 2017-07-15 21:29:08 -07:00
brocade
cadence net: macb: Adding Support for Jumbo Frames up to 10240 Bytes in SAMA5D3 2017-07-08 10:39:46 +01:00
calxeda
cavium liquidio: fix possible eeprom format string overflow 2017-07-14 09:03:11 -07:00
chelsio cxgb4: ptp_clock_register() returns error pointers 2017-07-14 08:18:51 -07:00
cirrus
cisco cisco: enic: Fic an error handling path in 'vnic_dev_init_devcmd2()' 2017-07-11 10:54:15 -07:00
davicom
dec
dlink
emulex
ezchip
faraday
freescale Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-30 12:43:08 -04:00
fujitsu
hisilicon net: hns: add acpi function of xge led control 2017-07-14 08:18:07 -07:00
hp
i825xx
ibm This is the first pull request for the new dma-mapping subsystem 2017-07-06 19:20:54 -07:00
intel pci-v4.13-changes 2017-07-08 15:51:57 -07:00
marvell net: mvpp2: remove mvpp2_pool_refill() 2017-06-22 13:42:56 -04:00
mediatek net: ethernet: mediatek: remove useless code in mtk_probe() 2017-07-08 11:27:55 +01:00
mellanox mlx4_en: remove unnecessary returned value check 2017-07-15 14:29:49 -07:00
micrel
microchip
moxa
myricom
natsemi
neterion
netronome nfp: freeing the wrong variable 2017-07-12 08:18:14 -07:00
nuvoton
nvidia
nxp net: manual clean code which call skb_put_[data:zero] 2017-06-20 13:30:15 -04:00
oki-semi
packetengines net: manual clean code which call skb_put_[data:zero] 2017-06-20 13:30:15 -04:00
pasemi
qlogic qed: Fix printk option passed when printing ipv6 addresses 2017-07-11 13:36:05 -07:00
qualcomm net: qcom/emac: fix double free of SGMII IRQ during shutdown 2017-07-14 08:55:32 -07:00
rdc
realtek
renesas
rocker Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-30 12:43:08 -04:00
samsung
seeq
sfc sfc: don't read beyond unicast address list 2017-07-12 14:41:06 -07:00
sgi ioc3-eth: store pointer to net_device for priviate area 2017-07-15 14:28:56 -07:00
silan
sis
smsc smsc911x: Add check for ioremap_nocache() return code 2017-07-12 14:35:43 -07:00
stmicro NET: dwmac: Make dwmac reset unconditional 2017-07-19 13:52:19 -07:00
sun net: niu: fix format string overflow warning: 2017-07-14 09:03:11 -07:00
synopsys
tehuti net: tehuti: don't process data if it has not been copied from userspace 2017-07-19 22:48:02 -07:00
ti Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-30 12:43:08 -04:00
tile
toshiba networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
tundra
via
wiznet
xilinx
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig
korina.c
lantiq_etop.c
Makefile
netx-eth.c