diff options
author | Tetsuo Handa <[email protected]> | 2022-07-19 14:49:39 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2022-07-19 14:18:27 +0200 |
commit | af77c56aa35325daa2bc2bed5c2ebf169be61b86 (patch) | |
tree | 9e432391942b840e47eb8170bdad665f043472f2 /scripts/gdb/linux/clk.py | |
parent | ceefa81e6e69b020997205e5c30a42d43aa5ae63 (diff) |
tty: vt: initialize unicode screen buffer
syzbot reports kernel infoleak at vcs_read() [1], for buffer can be read
immediately after resize operation. Initialize buffer using kzalloc().
----------
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <linux/fb.h>
int main(int argc, char *argv[])
{
struct fb_var_screeninfo var = { };
const int fb_fd = open("/dev/fb0", 3);
ioctl(fb_fd, FBIOGET_VSCREENINFO, &var);
var.yres = 0x21;
ioctl(fb_fd, FBIOPUT_VSCREENINFO, &var);
return read(open("/dev/vcsu", O_RDONLY), &var, sizeof(var)) == -1;
}
----------
Link: https://syzkaller.appspot.com/bug?extid=31a641689d43387f05d3 [1]
Cc: stable <[email protected]>
Reported-by: syzbot <[email protected]>
Reviewed-by: Jiri Slaby <[email protected]>
Signed-off-by: Tetsuo Handa <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/clk.py')
0 files changed, 0 insertions, 0 deletions