From: Qianqiang Liu <qianqiang.liu@163.com>
To: Helge Deller <deller@gmx.de>
Cc: aniel@ffwll.ch, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org,
dri-devel@lists.freedesktop.org, stable@vger.kernel.org,
syzbot+3d613ae53c031502687a@syzkaller.appspotmail.com
Subject: Re: [PATCH] fbcon: Fix a NULL pointer dereference issue in fbcon_putcs
Date: Fri, 20 Sep 2024 23:30:18 +0800 [thread overview]
Message-ID: <Zu2VCshU3Jx5X7oE@thinkpad.lan> (raw)
In-Reply-To: <a57734e8-ffb9-4af1-be02-eb0c99507048@gmx.de>
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
next prev parent reply other threads:[~2024-09-20 15:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-16 1:10 [PATCH] fbcon: Fix a NULL pointer dereference issue in fbcon_putcs Qianqiang Liu
2024-09-17 6:25 ` Helge Deller
2024-09-20 15:30 ` Qianqiang Liu [this message]
2024-09-24 16:13 ` [PATCH v2] " Qianqiang Liu
2024-09-24 16:59 ` Helge Deller
2024-09-25 5:29 ` [PATCH v3] " Qianqiang Liu
2024-09-25 19:33 ` Helge Deller
-- strict thread matches above, loose matches on Subject: below --
2024-09-17 7:28 [PATCH] " Qianqiang Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zu2VCshU3Jx5X7oE@thinkpad.lan \
--to=qianqiang.liu@163.com \
--cc=aniel@ffwll.ch \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=syzbot+3d613ae53c031502687a@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).