TTY: ttyprintk, don't touch behind tty->write_buf
Jiri Slaby authored
If a user provides a buffer larger than a tty->write_buf chunk and
passes '\r' at the end of the buffer, we touch an out-of-bound memory.

Add a check there to prevent this.
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Cc: stable@vger.kernel.org (everything maintained past v2.6.37)
Cc: Samo Pogacnik <samo_pogacnik@t-2.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
ee8b593a
Name Last commit Last update
..
agp agp/intel-agp: remove snb+ host bridge pciids
hw_random Merge tag 'virtio-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
ipmi char/ipmi: remove local ioctl defines replaced by generic ones
mwave 8250: three way resolve of the 8250 diffs
pcmcia pcmcia,synclink_cs: fix termios port I missed
tpm Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
xilinx_hwicap xilinx_hwicap: reset XHI_MAX_RETRIES
Kconfig ramoops: Move to fs/pstore/ram.c
Makefile ramoops: Move to fs/pstore/ram.c
apm-emulation.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/apm
applicom.c drivers/char/applicom.c: fix information leak to userland
applicom.h Linux-2.6.12-rc2
bfin-otp.c llseek: automatically add .llseek fop
bsr.c powerpc/BSR: cleanup the error path of bsr_init
ds1302.c Remove all #inclusions of asm/system.h
ds1620.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
dsp56k.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
dtlk.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
efirtc.c Remove all #inclusions of asm/system.h
generic_nvram.c drivers: fix up various ->llseek() implementations
genrtc.c Remove all #inclusions of asm/system.h
hangcheck-timer.c Input: sysrq - drop tty argument form handle_sysrq()
hpet.c printk(): add KERN_CONT where needed in hpet and vt code
i8k.c module_param: make bool parameters really bool (drivers & misc)
lp.c Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
mbcs.c
mbcs.h
mem.c
misc.c
mmtimer.c
msm_smd_pkt.c
mspec.c
nsc_gpio.c
nvram.c
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
ppdev.c
ps3flash.c
random.c
raw.c
rtc.c
scx200_gpio.c
snsc.c
snsc.h
snsc_event.c
sonypi.c
tb0219.c
tile-srom.c
tlclk.c
toshiba.c
ttyprintk.c
uv_mmtimer.c
virtio_console.c