Activity log for bug #1934110

Date Who What changed Old value New value Message
2021-06-30 09:10:46 Colin Ian King bug added bug
2021-06-30 09:10:52 Colin Ian King linux (Ubuntu): status New In Progress
2021-06-30 09:10:54 Colin Ian King linux (Ubuntu): importance Undecided High
2021-06-30 09:10:56 Colin Ian King linux (Ubuntu): assignee Colin Ian King (colin-king)
2021-06-30 09:12:24 Colin Ian King description [ SRU Justification ][GROOVY][HIRSUTE][IMPISH] == Impact == The ubuntu-host driver lacks procfs lseek ops and lseeking on the procfs esm-token file will jump to a NULL address causing the following splat: 942.470568] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 942.471157] #PF: supervisor instruction fetch in kernel mode [ 942.471724] #PF: error_code(0x0010) - not-present page [ 942.472297] PGD 0 P4D 0 [ 942.472867] Oops: 0010 [#1] SMP PTI [ 942.473435] CPU: 2 PID: 5661 Comm: stress-ng Not tainted 5.13.0-9-generic #9 [ 942.474012] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 [ 942.474599] RIP: 0010:0x0 [ 942.475194] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6. [ 942.475792] RSP: 0018:ffffaacf80ff7eb8 EFLAGS: 00010246 [ 942.476383] RAX: 0000000000000000 RBX: ffff9eaa8a175240 RCX: 0000000000000001 [ 942.476986] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff9eaa838d5800 [ 942.477600] RBP: ffffaacf80ff7ed0 R08: 0000000000004000 R09: 0000000000000004 [ 942.478203] R10: 0000000000000002 R11: 0000000000000000 R12: 0000000000000000 [ 942.478800] R13: 0000000000000000 R14: ffffffffffffffea R15: ffff9eaa838d5800 [ 942.479399] FS: 00007f998d487f00(0000) GS:ffff9eaaffc80000(0000) knlGS:0000000000000000 [ 942.480006] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 942.480607] CR2: ffffffffffffffd6 CR3: 000000010a774002 CR4: 0000000000370ee0 [ 942.481219] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 942.481855] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 942.482458] Call Trace: [ 942.483052] proc_reg_llseek+0x4e/0x80 [ 942.483646] ? __fdget_pos+0x43/0x50 [ 942.484234] ksys_lseek+0x84/0xc0 [ 942.484815] __x64_sys_lseek+0x1a/0x20 [ 942.485412] do_syscall_64+0x61/0xb0 [ 942.485966] ? asm_exc_page_fault+0x8/0x30 [ 942.486476] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 942.486994] RIP: 0033:0x7f998d5c1cdb [ 942.487512] Code: ff ff c3 0f 1f 40 00 48 8b 15 89 81 0d 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb ba 0f 1f 00 f3 0f 1e fa b8 08 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 8b 15 59 81 0d 00 f7 d8 [ 942.488593] RSP: 002b:00007ffdf61c5328 EFLAGS: 00000246 ORIG_RAX: 0000000000000008 [ 942.489148] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f998d5c1cdb [ 942.489710] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 [ 942.490252] RBP: 0000000000000004 R08: 000001785e4740dd R09: 0000562dbebb9e50 [ 942.490801] R10: 00007ffdf61c5300 R11: 0000000000000246 R12: 00007ffdf61c63f0 [ 942.491354] R13: 00007ffdf61c53f0 R14: 0000000000000003 R15: 00000000000001e9 == Fix == Add the default_llseek ops: diff --git a/ubuntu/ubuntu-host/ubuntu-host.c b/ubuntu/ubuntu-host/ubuntu-host.c index 1abd402..a4c0636 100644 --- a/ubuntu/ubuntu-host/ubuntu-host.c +++ b/ubuntu/ubuntu-host/ubuntu-host.c @@ -38,6 +38,8 @@ static ssize_t esm_token_write(struct file *f, const char __user *buf, static const struct proc_ops esm_token_fops = { .proc_read = esm_token_read, .proc_write = esm_token_write, + .proc_lseek = default_llseek, + }; == Test plan == modrobe ubuntu-host stress-ng --procfs 0 -t 60 without the fix we hit the splat. With the fix it's OK. == Where problems could occur == This one liner adds the missing proc_lseek op. It is hard to see where it can cause a regression since it affects the driver no other way. I doubt any code is relying on the current semantics of lseek not working. [ SRU Justification ][GROOVY][HIRSUTE][IMPISH] == Impact == The ubuntu-host driver lacks procfs lseek ops and lseeking on the procfs esm-token file will jump to a NULL address causing the following splat:   942.470568] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 942.471157] #PF: supervisor instruction fetch in kernel mode [ 942.471724] #PF: error_code(0x0010) - not-present page [ 942.472297] PGD 0 P4D 0 [ 942.472867] Oops: 0010 [#1] SMP PTI [ 942.473435] CPU: 2 PID: 5661 Comm: stress-ng Not tainted 5.13.0-9-generic #9 [ 942.474012] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 [ 942.474599] RIP: 0010:0x0 [ 942.475194] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6. [ 942.475792] RSP: 0018:ffffaacf80ff7eb8 EFLAGS: 00010246 [ 942.476383] RAX: 0000000000000000 RBX: ffff9eaa8a175240 RCX: 0000000000000001 [ 942.476986] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff9eaa838d5800 [ 942.477600] RBP: ffffaacf80ff7ed0 R08: 0000000000004000 R09: 0000000000000004 [ 942.478203] R10: 0000000000000002 R11: 0000000000000000 R12: 0000000000000000 [ 942.478800] R13: 0000000000000000 R14: ffffffffffffffea R15: ffff9eaa838d5800 [ 942.479399] FS: 00007f998d487f00(0000) GS:ffff9eaaffc80000(0000) knlGS:0000000000000000 [ 942.480006] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 942.480607] CR2: ffffffffffffffd6 CR3: 000000010a774002 CR4: 0000000000370ee0 [ 942.481219] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 942.481855] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 942.482458] Call Trace: [ 942.483052] proc_reg_llseek+0x4e/0x80 [ 942.483646] ? __fdget_pos+0x43/0x50 [ 942.484234] ksys_lseek+0x84/0xc0 [ 942.484815] __x64_sys_lseek+0x1a/0x20 [ 942.485412] do_syscall_64+0x61/0xb0 [ 942.485966] ? asm_exc_page_fault+0x8/0x30 [ 942.486476] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 942.486994] RIP: 0033:0x7f998d5c1cdb [ 942.487512] Code: ff ff c3 0f 1f 40 00 48 8b 15 89 81 0d 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb ba 0f 1f 00 f3 0f 1e fa b8 08 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 8b 15 59 81 0d 00 f7 d8 [ 942.488593] RSP: 002b:00007ffdf61c5328 EFLAGS: 00000246 ORIG_RAX: 0000000000000008 [ 942.489148] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f998d5c1cdb [ 942.489710] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 [ 942.490252] RBP: 0000000000000004 R08: 000001785e4740dd R09: 0000562dbebb9e50 [ 942.490801] R10: 00007ffdf61c5300 R11: 0000000000000246 R12: 00007ffdf61c63f0 [ 942.491354] R13: 00007ffdf61c53f0 R14: 0000000000000003 R15: 00000000000001e9 == Fix == Add the default_llseek ops: diff --git a/ubuntu/ubuntu-host/ubuntu-host.c b/ubuntu/ubuntu-host/ubuntu-host.c index 1abd402..a4c0636 100644 --- a/ubuntu/ubuntu-host/ubuntu-host.c +++ b/ubuntu/ubuntu-host/ubuntu-host.c @@ -38,6 +38,8 @@ static ssize_t esm_token_write(struct file *f, const char __user *buf,  static const struct proc_ops esm_token_fops = {         .proc_read = esm_token_read,         .proc_write = esm_token_write, + .proc_lseek = default_llseek, +  }; == Test plan == modrobe ubuntu-host stress-ng --procfs 0 -t 60 without the fix we hit the splat. With the fix it's OK. == Where problems could occur == This one liner adds the missing proc_lseek op. It is hard to see where it can cause a regression since it affects the driver no other way. I doubt any code is relying on the current semantics of lseek not working.
2021-07-06 07:26:43 Stefan Bader nominated for series Ubuntu Hirsute
2021-07-06 07:26:43 Stefan Bader bug task added linux (Ubuntu Hirsute)
2021-07-06 07:26:43 Stefan Bader nominated for series Ubuntu Groovy
2021-07-06 07:26:43 Stefan Bader bug task added linux (Ubuntu Groovy)
2021-07-06 07:27:26 Stefan Bader linux (Ubuntu Groovy): importance Undecided High
2021-07-06 07:27:26 Stefan Bader linux (Ubuntu Groovy): status New In Progress
2021-07-06 07:27:37 Stefan Bader linux (Ubuntu Hirsute): importance Undecided High
2021-07-06 07:27:37 Stefan Bader linux (Ubuntu Hirsute): status New In Progress
2021-07-15 15:43:07 Kleber Sacilotto de Souza linux (Ubuntu Groovy): status In Progress Fix Committed
2021-07-15 15:43:10 Kleber Sacilotto de Souza linux (Ubuntu Hirsute): status In Progress Fix Committed
2021-07-21 14:58:11 Ubuntu Kernel Bot tags verification-needed-hirsute
2021-07-23 11:27:36 Ubuntu Kernel Bot tags verification-needed-hirsute verification-needed-focal verification-needed-hirsute
2021-07-28 23:11:25 Brian Murray linux (Ubuntu Groovy): status Fix Committed Won't Fix
2021-08-05 08:17:27 Colin Ian King tags verification-needed-focal verification-needed-hirsute verification-done-hirsute verification-needed-focal
2021-08-05 08:20:35 Colin Ian King tags verification-done-hirsute verification-needed-focal verification-done-hirsute
2021-08-16 16:20:07 Launchpad Janitor linux (Ubuntu Hirsute): status Fix Committed Fix Released
2021-08-18 23:09:18 Launchpad Janitor linux (Ubuntu): status In Progress Fix Released
2021-08-31 10:46:07 Ubuntu Kernel Bot tags verification-done-hirsute verification-done-hirsute verification-needed-focal
2021-09-02 16:19:58 Stefan Bader tags verification-done-hirsute verification-needed-focal verification-done-hirsute