Re: KASAN: use-after-free Read in bit_putcs

2020-09-28 Thread Peilin Ye
On Sun, Sep 27, 2020 at 05:28:12PM +0900, Tetsuo Handa wrote: > Well, vt_io_ioctl(PIO_FONT) initializes "struct console_font_op op;" with > > op.width = 8; > op.height = 0; > op.charcount = 256; > > and calls con_font_set() from con_font_op(). But the "/* Need to guess font > height

Re: KASAN: use-after-free Read in bit_putcs

2020-09-28 Thread Peilin Ye
On Sun, Sep 27, 2020 at 01:25:17AM +0900, Tetsuo Handa wrote: > A simplified reproducer and debug printk() patch shown below reported that > vc_font.height is increased to 9 via ioctl(VT_RESIZEX) after it was once > decreased from 16 to 2 via ioctl(PIO_FONT). > > > > Since vc_resize() with

Re: KASAN: use-after-free Read in bit_putcs

2020-09-28 Thread Tetsuo Handa
A simplified reproducer and debug printk() patch shown below reported that vc_font.height is increased to 9 via ioctl(VT_RESIZEX) after it was once decreased from 16 to 2 via ioctl(PIO_FONT). Since vc_resize() with v.v_rows == 0 preserves current vc->vc_rows value, this reproducer is bypassing

Re: KASAN: use-after-free Read in bit_putcs

2020-09-28 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:171d4ff7 Merge tag 'mmc-v5.9-rc4-2' of git://git.kernel.or.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=13b41d0390 kernel config:

Re: KASAN: use-after-free Read in bit_putcs

2020-09-28 Thread Tetsuo Handa
Well, vt_io_ioctl(PIO_FONT) initializes "struct console_font_op op;" with op.width = 8; op.height = 0; op.charcount = 256; and calls con_font_set() from con_font_op(). But the "/* Need to guess font height [compat] */" chunk in con_font_set() guesses font's height due to being initialized

Re: KASAN: use-after-free Read in bit_putcs

2020-09-28 Thread Tetsuo Handa
On 2020/09/27 4:39, Peilin Ye wrote: > On Sun, Sep 27, 2020 at 01:25:17AM +0900, Tetsuo Handa wrote: >> Since I don't know the meaning of "struct vt_consize"->v_clin (which is >> commented >> with "/* number of pixel rows per character */" but does it mean font size >> ?), >> I don't know why we

KASAN: use-after-free Read in bit_putcs

2020-02-24 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:0a44cac8 Merge tag 'dma-mapping-5.6' of git://git.infradea.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=11bfb74ee0 kernel config: https://syzkaller.appspot.com/x/.config?x=a61f2164c515c07f