• One Thousand Gnomes's avatar
    6pack: fix free memory scribbles · 60aa3b08
    One Thousand Gnomes authored
    commit acf673a3 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: default avatarAlan Cox <alan@linux.intel.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    60aa3b08
6pack.c 24.3 KB