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] [day] [month] [year] [list]
Message-ID: <s5ha6o8wdiq.wl-tiwai@suse.de>
Date:   Wed, 02 Jun 2021 16:24:13 +0200
From:   Takashi Iwai <tiwai@...e.de>
To:     Jaroslav Kysela <perex@...ex.cz>
Cc:     Dongliang Mu <mudongliangabcd@...il.com>, allen.lkml@...il.com,
        alsa-devel@...a-project.org, Joe Perches <joe@...ches.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        pierre-louis.bossart@...ux.intel.com, romain.perier@...il.com,
        syzkaller-bugs <syzkaller-bugs@...glegroups.com>, tiwai@...e.com
Subject: Re: [syzbot] UBSAN: shift-out-of-bounds in snd_timer_user_ccallback

On Wed, 02 Jun 2021 16:19:13 +0200,
Jaroslav Kysela wrote:
> 
> On 02. 06. 21 15:18, Dongliang Mu wrote:
> >> Hello,
> >>
> >> syzbot found the following issue on:
> >>
> >> HEAD commit: 5ff2756a Merge tag 'nfs-for-5.13-2' of git://git.linux-nfs..
> >> git tree: upstream
> >> console output: https://syzkaller.appspot.com/x/log.txt?x=17872d5bd00000
> >> kernel config: https://syzkaller.appspot.com/x/.config?x=770708ea7cfd4916
> >> dashboard link: https://syzkaller.appspot.com/bug?extid=d102fa5b35335a7e544e
> >>
> >> Unfortunately, I don't have any reproducer for this issue yet.
> >>
> >> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> >> Reported-by: syzbot+d102fa...@...kaller.appspotmail.com
> >>
> >> ================================================================================
> >> UBSAN: shift-out-of-bounds in sound/core/timer.c:1376:23
> >> shift exponent 105 is too large for 32-bit type 'int'
> >> CPU: 1 PID: 10368 Comm: syz-executor.1 Not tainted 5.13.0-rc3-syzkaller #0
> >> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> >> Call Trace:
> >> __dump_stack lib/dump_stack.c:79 [inline]
> >> dump_stack+0x141/0x1d7 lib/dump_stack.c:120
> >> ubsan_epilogue+0xb/0x5a lib/ubsan.c:148
> >> __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:327
> >> snd_timer_user_ccallback.cold+0x19/0x1e sound/core/timer.c:1376
> >>
> >> snd_timer_notify1+0x243/0x3b0 sound/core/timer.c:525
> > 
> > The root cause of this bug is in the snd_timer_notify1 [1]. At the end
> > of this function, it calls "ts->ccallback(ts, event + 100, &tstamp,
> > resolution)".
> > 
> > Here the variable event is 5. It adds 100 and is passed as 2nd
> > argument of snd_timer_user_ccallback.
> > 
> >>From the variable naming, the 2nd argument should an event, and in the
> > range of event enumeration. In fact, 105 (event + 100) is out of this
> > range. I don't quite understand the meaning of adding 100. Any thought
> > here?
> 
> It seems that the original intent was to move the event to the M... events:
> 
>      SNDRV_TIMER_EVENT_MSTART = SNDRV_TIMER_EVENT_START + 10,
> 
> So the added value should be 10 which should not break the shift range (8
> /resume/ + 10 = 18).

I've already submitted the fix patch, but it doesn't seem reaching
properly to ML.  Hmm.  Will resend.


Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ