linux-hardened/drivers/net
Christoph Schulz cc25eaae23 net: ppp: fix creating PPP pass and active filters
Commit 568f194e8b ("net: ppp: use
sk_unattached_filter api") inadvertently changed the logic when setting
PPP pass and active filters. This applies to both the generic PPP subsystem
implemented by drivers/net/ppp/ppp_generic.c and the ISDN PPP subsystem
implemented by drivers/isdn/i4l/isdn_ppp.c. The original code in ppp_ioctl()
(or isdn_ppp_ioctl(), resp.) handling PPPIOCSPASS and PPPIOCSACTIVE allowed to
remove a pass/active filter previously set by using a filter of length zero.
However, with the new code this is not possible anymore as this case is not
explicitly checked for, which leads to passing NULL as a filter to
sk_unattached_filter_create(). This results in returning EINVAL to the caller.

Additionally, the variables ppp->pass_filter and ppp->active_filter (or
is->pass_filter and is->active_filter, resp.) are not reset to NULL, although
the filters they point to may have been destroyed by
sk_unattached_filter_destroy(), so in this EINVAL case dangling pointers are
left behind (provided the pointers were previously non-NULL).

This patch corrects both problems by checking whether the filter passed is
empty or non-empty, and prevents sk_unattached_filter_create() from being
called in the first case. Moreover, the pointers are always reset to NULL
as soon as sk_unattached_filter_destroy() returns.

Signed-off-by: Christoph Schulz <develop@kristov.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-16 23:42:06 -07:00
..
appletalk
arcnet
bonding bonding: fix ad_select module param check 2014-07-14 14:36:58 -07:00
caif
can slcan: Port write_wakeup deadlock fix from slip 2014-06-16 21:29:13 -07:00
cris
dsa net: dsa: update DSA drivers to use ds_to_priv 2014-04-30 13:31:25 -04:00
ethernet net/mlx4_en: cq->irq_desc wasn't set in legacy EQ's 2014-07-16 23:28:32 -07:00
fddi defxx: Fix !DYNAMIC_BUFFERS compilation warnings 2014-07-02 18:26:29 -07:00
hamradio
hippi
hyperv hyperv: fix apparent cut-n-paste error in send path teardown 2014-06-16 21:36:13 -07:00
ieee802154 at86rf230: fix irq setup 2014-06-22 18:04:03 -07:00
irda Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-06-12 14:27:40 -07:00
phy dp83640: Always decode received status frames 2014-07-09 17:00:34 -07:00
plip
ppp net: ppp: fix creating PPP pass and active filters 2014-07-16 23:42:06 -07:00
slip slip: Fix deadlock in write_wakeup 2014-06-16 21:29:12 -07:00
team Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-06-03 23:32:12 -07:00
usb hso: fix deadlock when receiving bursts of data 2014-07-14 19:27:34 -07:00
vmxnet3 vmxnet3: adjust ring sizes when interface is down 2014-06-16 21:26:40 -07:00
wan farsync: fix invalid memory accesses in fst_add_one() and fst_init_card() 2014-07-11 13:34:48 -07:00
wimax net: wimax: i2400m: control.c: Cleaning up conjunction always evaluates to false 2014-06-11 00:13:16 -07:00
wireless rt2800usb: Don't perform DMA from stack 2014-07-07 15:04:34 -04:00
xen-netback xen-netback: bookkeep number of active queues in our own module 2014-06-25 15:59:47 -07:00
dummy.c
eql.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macvlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-06-11 16:02:55 -07:00
macvtap.c mactap: Fix checksum errors for non-gso packets in bridge mode 2014-04-30 16:12:22 -04:00
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c net: use ethtool_cmd_speed_set helper to set ethtool speed value 2014-06-06 16:24:07 -07:00
rionet.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
sb1000.c
Space.c
sungem_phy.c
tun.c net-tun: restructure tun_do_read for better sleep/wakeup efficiency 2014-05-21 15:50:28 -04:00
veth.c
virtio_net.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
vxlan.c vxlan: Checksum fixes 2014-06-15 01:00:50 -07:00
xen-netfront.c xen-netfront: call netif_carrier_off() only once when disconnecting 2014-07-08 11:21:03 -07:00