lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 5 Apr 2023 23:07:24 +0200
From:   Marco Elver <elver@...gle.com>
To:     syzbot <syzbot+3b14b2ed9b3d06dcaa07@...kaller.appspotmail.com>
Cc:     linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com,
        Thomas Gleixner <tglx@...utronix.de>,
        Anna-Maria Behnsen <anna-maria@...utronix.de>,
        Jacob Keller <jacob.e.keller@...el.com>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Frederic Weisbecker <frederic@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: WARNING in timer_wait_running

[-Bcc wrongly added folks]
[+Cc kernel/time maintainers]

On Mon, Aug 31, 2020 at 10:07AM -0700, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    1127b219 Merge tag 'fallthrough-fixes-5.9-rc3' of git://gi..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=1501768e900000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=978db74cb30aa994
> dashboard link: https://syzkaller.appspot.com/bug?extid=3b14b2ed9b3d06dcaa07

Dashboard has recent reports (also below) and reproducer (also attached).

> compiler:       gcc (GCC) 10.1.0-syz 20200507
> userspace arch: i386

Not just i386.

> The issue was bisected to:
> 
> commit b1012ca8dc4f9b1a1fe8e2cb1590dd6d43ea3849
> Author: Lu Baolu <baolu.lu@...ux.intel.com>
> Date:   Thu Jul 23 01:34:37 2020 +0000
> 
>     iommu/vt-d: Skip TE disabling on quirky gfx dedicated iommu

This bisection is wrong.

> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+3b14b2ed9b3d06dcaa07@...kaller.appspotmail.com

[...]
> WARNING: CPU: 0 PID: 10581 at kernel/time/posix-timers.c:849 timer_wait_running+0x218/0x250 kernel/time/posix-timers.c:849
[ .. snip ancient warning ..]

Up-to-date warning:

 | WARNING: CPU: 1 PID: 6695 at kernel/time/posix-timers.c:849 timer_wait_running+0x255/0x290 kernel/time/posix-timers.c:849
 | Modules linked in:
 | CPU: 1 PID: 6695 Comm: syz-executor.3 Not tainted 6.3.0-rc3-syzkaller-00338-gda8e7da11e4b #0
 | Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
 | RIP: 0010:timer_wait_running+0x255/0x290 kernel/time/posix-timers.c:849
 | Code: 00 48 c7 c2 80 fe 4e 8a be 06 03 00 00 48 c7 c7 e0 fe 4e 8a c6 05 63 cb ed 0c 01 e8 85 77 ef ff e9 5b fe ff ff e8 2b 7d 0e 00 <0f> 0b e9 b2 fe ff ff e8 0f 8a 5f 00 e9 fe fd ff ff e8 25 8a 5f 00
 | RSP: 0018:ffffc90003ecfd50 EFLAGS: 00010293
 | RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
 | RDX: ffff888020e4ba80 RSI: ffffffff81746785 RDI: ffffffff8a4f0ad8
 | RBP: ffff88807c696d38 R08: 0000000000000001 R09: 0000000000000001
 | R10: fffffbfff1cef98a R11: 0000000000000021 R12: ffffc90003ecfdb0
 | R13: 0000000000000000 R14: ffffffff8a4f0a60 R15: ffffc90003ecfdb0
 | FS:  00007fae387fe700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
 | CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 | CR2: 00007f0d105821b8 CR3: 000000002a283000 CR4: 00000000003526e0
 | DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
 | DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
 | Call Trace:
 |  <TASK>
 |  do_timer_settime.part.0+0x119/0x1d0 kernel/time/posix-timers.c:929
 |  do_timer_settime kernel/time/posix-timers.c:938 [inline]
 |  __do_sys_timer_settime kernel/time/posix-timers.c:952 [inline]
 |  __se_sys_timer_settime kernel/time/posix-timers.c:938 [inline]
 |  __x64_sys_timer_settime+0x21d/0x310 kernel/time/posix-timers.c:938
 |  do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 |  do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 |  entry_SYSCALL_64_after_hwframe+0x63/0xcd
 | RIP: 0033:0x7fae3948c0f9
 | Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
 | RSP: 002b:00007fae387fe168 EFLAGS: 00000246 ORIG_RAX: 00000000000000df
 | RAX: ffffffffffffffda RBX: 00007fae395ac050 RCX: 00007fae3948c0f9
 | RDX: 0000000020000080 RSI: 0000000000000000 RDI: 0000000000000000
 | RBP: 00007fae394e7b39 R08: 0000000000000000 R09: 0000000000000000
 | R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
 | R13: 00007fae396cfb1f R14: 00007fae387fe300 R15: 0000000000022000
 |  </TASK>

I've seen this warning in the wild recently, and it's been around since
2020 according to syzbot.

The warning was added in ec8f954a40da8 ("posix-timers: Use a callback
for cancel synchronization on PREEMPT_RT").

Why is it wrong for timer_wait_running to be NULL?

[ attached C reproducer ]

Thanks,
-- Marco

View attachment "timer-warn.c" of type "text/x-csrc" (6574 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ