]> git.baikalelectronics.ru Git - kernel.git/commit
6pack: fix free memory scribbles
authorOne Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Tue, 5 Jan 2016 11:51:25 +0000 (11:51 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jan 2016 06:25:01 +0000 (01:25 -0500)
commitec18f8b62c3e450c5c0344d0b575fb7e6655c364
tree6150db6b5626e1994ff23db0ac66a255556b83bc
parent8b3eaf54a421fdf1f327a72a20a3f604e285ec4d
6pack: fix free memory scribbles

commit 29356e719bc0d6abe4267963cb8bb03759802db6 fixed a user triggerable free
memory scribble but in doing so replaced it with a different one that allows
the user to control the data and scribble even more.

sixpack_close is called by the tty layer in tty context. The tty context is
protected by sp_get() and sp_put(). However network layer activity via
sp_xmit() is not protected this way. We must therefore stop the queue
otherwise the user gets to dump a buffer mostly of their choice into freed
kernel pages.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hamradio/6pack.c