[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zu2VCshU3Jx5X7oE@thinkpad.lan>
Date: Fri, 20 Sep 2024 23:30:18 +0800
From: Qianqiang Liu <qianqiang.liu@....com>
To: Helge Deller <deller@....de>
Cc: aniel@...ll.ch, gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org, linux-fbdev@...r.kernel.org,
dri-devel@...ts.freedesktop.org, stable@...r.kernel.org,
syzbot+3d613ae53c031502687a@...kaller.appspotmail.com
Subject: Re: [PATCH] fbcon: Fix a NULL pointer dereference issue in
fbcon_putcs
Hi,
I simplified the C reproducer as follows:
#include <stdint.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/fb.h>
#include <linux/tiocl.h>
#include <sys/ioctl.h>
struct param {
uint8_t type;
struct tiocl_selection ts;
};
int main()
{
write(1, "executing program\n", sizeof("executing program\n") - 1);
int fd = open("/dev/fb1", 0, 0);
struct fb_con2fbmap con2fb;
con2fb.console = 0x19;
con2fb.framebuffer = 0;
ioctl(fd, FBIOPUT_CON2FBMAP, &con2fb);
int fd1 = open("/dev/tty1", O_RDWR, 0);
struct param param;
param.type = 2;
param.ts.xs = 0;
param.ts.ys = 0;
param.ts.xe = 0;
param.ts.ye = 0;
param.ts.sel_mode = 0;
ioctl(fd1, TIOCLINUX, ¶m);
con2fb.console = 1;
con2fb.framebuffer = 0;
ioctl(fd, FBIOPUT_CON2FBMAP, &con2fb);
return 0;
}
But I still need time to debug the kernel code..
--
Best,
Qianqiang Liu
Powered by blists - more mailing lists