* [syzbot] [serial?] general protection fault in vc_deallocate
@ 2025-09-08 18:45 syzbot
2025-09-09 0:51 ` [PATCH Next] vt: move vc_saved_screen to within tty allocated judgment Edward Adam Davis
2025-09-10 6:21 ` [syzbot] [serial?] general protection fault in vc_deallocate syzbot
0 siblings, 2 replies; 6+ messages in thread
From: syzbot @ 2025-09-08 18:45 UTC (permalink / raw)
To: gregkh, jirislaby, linux-kernel, linux-serial, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 3e8e5822146b Add linux-next specific files for 20250908
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=11984642580000
kernel config: https://syzkaller.appspot.com/x/.config?x=69cfefa929ab96f7
dashboard link: https://syzkaller.appspot.com/bug?extid=f6cb41c144427dc0796a
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17230934580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15984642580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/eaa87d8bc6ca/disk-3e8e5822.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/6640e70f5002/vmlinux-3e8e5822.xz
kernel image: https://storage.googleapis.com/syzbot-assets/40f622291050/bzImage-3e8e5822.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f6cb41c144427dc0796a@syzkaller.appspotmail.com
Oops: general protection fault, probably for non-canonical address 0xdffffc00000000b2: 0000 [#1] SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000590-0x0000000000000597]
CPU: 0 UID: 0 PID: 6062 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
RIP: 0010:vc_deallocate+0x303/0x3e0 drivers/tty/vt/vt.c:1345
Code: e8 f2 1f d7 fc 49 c7 07 00 00 00 00 eb 0e e8 14 1d 73 fc eb 05 e8 0d 1d 73 fc 31 db 4c 8d b3 90 05 00 00 4d 89 f4 49 c1 ec 03 <43> 80 3c 2c 00 74 08 4c 89 f7 e8 ce 1e d7 fc 4d 8b 3e 4d 85 ff 74
RSP: 0018:ffffc900035f79e0 EFLAGS: 00010206
RAX: ffffffff854c8f03 RBX: 0000000000000000 RCX: ffff88807dd3dac0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 000000000000003f
RBP: ffffc900035f7a90 R08: ffffffff8fc3c7cf R09: 1ffffffff1f878f9
R10: dffffc0000000000 R11: fffffbfff1f878fa R12: 00000000000000b2
R13: dffffc0000000000 R14: 0000000000000590 R15: ffffffff9a034a30
FS: 000055557fa10500(0000) GS:ffff8881259f1000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055557fa10808 CR3: 000000007ba62000 CR4: 00000000003526f0
Call Trace:
<TASK>
vt_disallocate_all+0x60/0xe0 drivers/tty/vt/vt_ioctl.c:652
vt_ioctl+0x1adc/0x1f20 drivers/tty/vt/vt_ioctl.c:886
tty_ioctl+0x926/0xde0 drivers/tty/tty_io.c:2792
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:598 [inline]
__se_sys_ioctl+0xfc/0x170 fs/ioctl.c:584
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f97fa38ebe9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe553801c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f97fa5c5fa0 RCX: 00007f97fa38ebe9
RDX: 0000000000000000 RSI: 0000000000005608 RDI: 0000000000000004
RBP: 00007f97fa411e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f97fa5c5fa0 R14: 00007f97fa5c5fa0 R15: 0000000000000002
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:vc_deallocate+0x303/0x3e0 drivers/tty/vt/vt.c:1345
Code: e8 f2 1f d7 fc 49 c7 07 00 00 00 00 eb 0e e8 14 1d 73 fc eb 05 e8 0d 1d 73 fc 31 db 4c 8d b3 90 05 00 00 4d 89 f4 49 c1 ec 03 <43> 80 3c 2c 00 74 08 4c 89 f7 e8 ce 1e d7 fc 4d 8b 3e 4d 85 ff 74
RSP: 0018:ffffc900035f79e0 EFLAGS: 00010206
RAX: ffffffff854c8f03 RBX: 0000000000000000 RCX: ffff88807dd3dac0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 000000000000003f
RBP: ffffc900035f7a90 R08: ffffffff8fc3c7cf R09: 1ffffffff1f878f9
R10: dffffc0000000000 R11: fffffbfff1f878fa R12: 00000000000000b2
R13: dffffc0000000000 R14: 0000000000000590 R15: ffffffff9a034a30
FS: 000055557fa10500(0000) GS:ffff8881259f1000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055557fa10808 CR3: 000000007ba62000 CR4: 00000000003526f0
----------------
Code disassembly (best guess):
0: e8 f2 1f d7 fc call 0xfcd71ff7
5: 49 c7 07 00 00 00 00 movq $0x0,(%r15)
c: eb 0e jmp 0x1c
e: e8 14 1d 73 fc call 0xfc731d27
13: eb 05 jmp 0x1a
15: e8 0d 1d 73 fc call 0xfc731d27
1a: 31 db xor %ebx,%ebx
1c: 4c 8d b3 90 05 00 00 lea 0x590(%rbx),%r14
23: 4d 89 f4 mov %r14,%r12
26: 49 c1 ec 03 shr $0x3,%r12
* 2a: 43 80 3c 2c 00 cmpb $0x0,(%r12,%r13,1) <-- trapping instruction
2f: 74 08 je 0x39
31: 4c 89 f7 mov %r14,%rdi
34: e8 ce 1e d7 fc call 0xfcd71f07
39: 4d 8b 3e mov (%r14),%r15
3c: 4d 85 ff test %r15,%r15
3f: 74 .byte 0x74
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH Next] vt: move vc_saved_screen to within tty allocated judgment
2025-09-08 18:45 [syzbot] [serial?] general protection fault in vc_deallocate syzbot
@ 2025-09-09 0:51 ` Edward Adam Davis
2025-09-09 6:35 ` Jiri Slaby
2025-09-10 6:21 ` [syzbot] [serial?] general protection fault in vc_deallocate syzbot
1 sibling, 1 reply; 6+ messages in thread
From: Edward Adam Davis @ 2025-09-09 0:51 UTC (permalink / raw)
To: syzbot+f6cb41c144427dc0796a
Cc: gregkh, jirislaby, linux-kernel, linux-serial, syzkaller-bugs
Everything starts with the assumption that a tty has been allocated.
Therefore, Move it to within the tty allocation check.
Fixes: 23743ba64709 ("vt: add support for smput/rmput escape codes")
Reported-by: syzbot+f6cb41c144427dc0796a@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=f6cb41c144427dc0796a
Tested-by: syzbot+f6cb41c144427dc0796a@syzkaller.appspotmail.com
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
---
drivers/tty/vt/vt.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 1d9abcfac4c9..6e0089b85c27 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -1341,10 +1341,10 @@ struct vc_data *vc_deallocate(unsigned int currcons)
vc_uniscr_set(vc, NULL);
kfree(vc->vc_screenbuf);
vc_cons[currcons].d = NULL;
- }
- if (vc->vc_saved_screen != NULL) {
- kfree(vc->vc_saved_screen);
- vc->vc_saved_screen = NULL;
+ if (vc->vc_saved_screen != NULL) {
+ kfree(vc->vc_saved_screen);
+ vc->vc_saved_screen = NULL;
+ }
}
return vc;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH Next] vt: move vc_saved_screen to within tty allocated judgment
2025-09-09 0:51 ` [PATCH Next] vt: move vc_saved_screen to within tty allocated judgment Edward Adam Davis
@ 2025-09-09 6:35 ` Jiri Slaby
0 siblings, 0 replies; 6+ messages in thread
From: Jiri Slaby @ 2025-09-09 6:35 UTC (permalink / raw)
To: Edward Adam Davis, syzbot+f6cb41c144427dc0796a
Cc: gregkh, linux-kernel, linux-serial, syzkaller-bugs
On 09. 09. 25, 2:51, Edward Adam Davis wrote:
> Everything starts with the assumption that a tty has been allocated.
> Therefore, Move it to within the tty allocation check.
>
> Fixes: 23743ba64709 ("vt: add support for smput/rmput escape codes")
> Reported-by: syzbot+f6cb41c144427dc0796a@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=f6cb41c144427dc0796a
> Tested-by: syzbot+f6cb41c144427dc0796a@syzkaller.appspotmail.com
> Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Ugh, sure.
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
thanks,
--
js
suse labs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [syzbot] [serial?] general protection fault in vc_deallocate
2025-09-08 18:45 [syzbot] [serial?] general protection fault in vc_deallocate syzbot
2025-09-09 0:51 ` [PATCH Next] vt: move vc_saved_screen to within tty allocated judgment Edward Adam Davis
@ 2025-09-10 6:21 ` syzbot
2025-09-10 6:48 ` Jiri Slaby
1 sibling, 1 reply; 6+ messages in thread
From: syzbot @ 2025-09-10 6:21 UTC (permalink / raw)
To: calixte.pernot, eadavis, gregkh, jirislaby, linux-kernel,
linux-serial, npitre, syzkaller-bugs
syzbot has bisected this issue to:
commit 23743ba64709a9c137c1b928f8b8e00d846af9cc
Author: Calixte Pernot <calixte.pernot@grenoble-inp.org>
Date: Mon Aug 25 12:56:09 2025 +0000
vt: add support for smput/rmput escape codes
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=16fded62580000
start commit: 3e8e5822146b Add linux-next specific files for 20250908
git tree: linux-next
final oops: https://syzkaller.appspot.com/x/report.txt?x=15fded62580000
console output: https://syzkaller.appspot.com/x/log.txt?x=11fded62580000
kernel config: https://syzkaller.appspot.com/x/.config?x=69cfefa929ab96f7
dashboard link: https://syzkaller.appspot.com/bug?extid=f6cb41c144427dc0796a
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17230934580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15984642580000
Reported-by: syzbot+f6cb41c144427dc0796a@syzkaller.appspotmail.com
Fixes: 23743ba64709 ("vt: add support for smput/rmput escape codes")
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [syzbot] [serial?] general protection fault in vc_deallocate
2025-09-10 6:21 ` [syzbot] [serial?] general protection fault in vc_deallocate syzbot
@ 2025-09-10 6:48 ` Jiri Slaby
2025-09-10 7:20 ` syzbot
0 siblings, 1 reply; 6+ messages in thread
From: Jiri Slaby @ 2025-09-10 6:48 UTC (permalink / raw)
To: syzbot, calixte.pernot, eadavis, gregkh, linux-kernel,
linux-serial, npitre, syzkaller-bugs
On 10. 09. 25, 8:21, syzbot wrote:
> syzbot has bisected this issue to:
>
> commit 23743ba64709a9c137c1b928f8b8e00d846af9cc
> Author: Calixte Pernot <calixte.pernot@grenoble-inp.org>
> Date: Mon Aug 25 12:56:09 2025 +0000
>
> vt: add support for smput/rmput escape codes
>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=16fded62580000
> start commit: 3e8e5822146b Add linux-next specific files for 20250908
> git tree: linux-next
> final oops: https://syzkaller.appspot.com/x/report.txt?x=15fded62580000
> console output: https://syzkaller.appspot.com/x/log.txt?x=11fded62580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=69cfefa929ab96f7
> dashboard link: https://syzkaller.appspot.com/bug?extid=f6cb41c144427dc0796a
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17230934580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15984642580000
>
> Reported-by: syzbot+f6cb41c144427dc0796a@syzkaller.appspotmail.com
> Fixes: 23743ba64709 ("vt: add support for smput/rmput escape codes")
>
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection
#syz test:
https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git/ tty-fix
--
js
suse labs
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [syzbot] [serial?] general protection fault in vc_deallocate
2025-09-10 6:48 ` Jiri Slaby
@ 2025-09-10 7:20 ` syzbot
0 siblings, 0 replies; 6+ messages in thread
From: syzbot @ 2025-09-10 7:20 UTC (permalink / raw)
To: calixte.pernot, eadavis, gregkh, jirislaby, linux-kernel,
linux-serial, npitre, syzkaller-bugs
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-by: syzbot+f6cb41c144427dc0796a@syzkaller.appspotmail.com
Tested-by: syzbot+f6cb41c144427dc0796a@syzkaller.appspotmail.com
Tested on:
commit: 55196010 vt: move vc_saved_screen to within tty alloca..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git/ tty-fix
console output: https://syzkaller.appspot.com/x/log.txt?x=159bed62580000
kernel config: https://syzkaller.appspot.com/x/.config?x=69cfefa929ab96f7
dashboard link: https://syzkaller.appspot.com/bug?extid=f6cb41c144427dc0796a
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
Note: no patches were applied.
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-09-10 7:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-08 18:45 [syzbot] [serial?] general protection fault in vc_deallocate syzbot
2025-09-09 0:51 ` [PATCH Next] vt: move vc_saved_screen to within tty allocated judgment Edward Adam Davis
2025-09-09 6:35 ` Jiri Slaby
2025-09-10 6:21 ` [syzbot] [serial?] general protection fault in vc_deallocate syzbot
2025-09-10 6:48 ` Jiri Slaby
2025-09-10 7:20 ` syzbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox