linux-stable/drivers/isdn/i4l
Meng Xu 02388bf87f isdn/i4l: fetch the ppp_write buffer in one shot
In isdn_ppp_write(), the header (i.e., protobuf) of the buffer is
fetched twice from userspace. The first fetch is used to peek at the
protocol of the message and reset the huptimer if necessary; while the
second fetch copies in the whole buffer. However, given that buf resides
in userspace memory, a user process can race to change its memory content
across fetches. By doing so, we can either avoid resetting the huptimer
for any type of packets (by first setting proto to PPP_LCP and later
change to the actual type) or force resetting the huptimer for LCP
packets.

This patch changes this double-fetch behavior into two single fetches
decided by condition (lp->isdn_device < 0 || lp->isdn_channel <0).
A more detailed discussion can be found at
https://marc.info/?l=linux-kernel&m=150586376926123&w=2

Signed-off-by: Meng Xu <mengxu.gatech@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-09-20 16:01:36 -07:00
..
isdn_audio.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
isdn_audio.h
isdn_bsdcomp.c idsn: fix wrong skb_put() used 2017-06-21 09:46:02 -04:00
isdn_common.c isdn/i4l: fix buffer overflow 2017-08-02 20:43:36 -07:00
isdn_common.h TTY: switch tty_insert_flip_string 2013-01-15 22:22:35 -08:00
isdn_concap.c isdn: use designated initializers 2016-12-17 11:56:57 -05:00
isdn_concap.h
isdn_net.c isdn/i4l: fix buffer overflow 2017-08-02 20:43:36 -07:00
isdn_net.h
isdn_ppp.c isdn/i4l: fetch the ppp_write buffer in one shot 2017-09-20 16:01:36 -07:00
isdn_ppp.h
isdn_tty.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
isdn_tty.h
isdn_ttyfax.c
isdn_ttyfax.h
isdn_v110.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
isdn_v110.h
isdn_x25iface.c networking: add and use skb_put_u8() 2017-06-16 11:48:40 -04:00
isdn_x25iface.h wanrouter: completely decouple obsolete code from kernel. 2013-01-31 19:20:33 -05:00
isdnhdlc.c
Kconfig isdn: i4l: move active-isdn drivers to staging 2016-03-05 15:00:38 -08:00
Makefile