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]
Message-ID: <20210506180053.4770f495@gmail.com>
Date:   Thu, 6 May 2021 18:00:53 +0300
From:   Pavel Skripkin <paskripkin@...il.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Uladzislau Rezki <urezki@...il.com>, linux-usb@...r.kernel.org,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        mchehab@...nel.org, syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] WARNING in __vmalloc_node_range

On Thu, 6 May 2021 17:57:22 +0300
Dan Carpenter <dan.carpenter@...cle.com> wrote:

> On Thu, May 06, 2021 at 04:22:10PM +0200, Uladzislau Rezki wrote:
> > Seems like vmalloc() is called with zero size passed:
> > 
> > <snip>
> > void *__vmalloc_node_range(unsigned long size, unsigned long align,
> > 			unsigned long start, unsigned long end,
> > gfp_t gfp_mask, pgprot_t prot, unsigned long vm_flags, int node,
> > 			const void *caller)
> > {
> > 	struct vm_struct *area;
> > 	void *addr;
> > 	unsigned long real_size = size;
> > 	unsigned long real_align = align;
> > 	unsigned int shift = PAGE_SHIFT;
> > 
> > 2873	if (WARN_ON_ONCE(!size))
> > 		return NULL;
> > <snip>
> > 
> > from the dvb_dmx_init() driver:
> > 
> > <snip>
> > int dvb_dmx_init(struct dvb_demux *dvbdemux)
> > {
> > 	int i;
> > 	struct dmx_demux *dmx = &dvbdemux->dmx;
> > 
> > 	dvbdemux->cnt_storage = NULL;
> > 	dvbdemux->users = 0;
> > 1251	dvbdemux->filter = vmalloc(array_size(sizeof(struct
> > dvb_demux_filter), <snip>
> >    dvbdemux->filternum));
> 
> Indeed.
> 
> It is a mystery because array_size() should never return less than
> sizeof(struct dvb_demux_filter).  That's the whole point of the
> array_size() function is that it returns ULONG_MAX if there is an
> integer overflow.
> 
> regards,
> dan carpenter
> 
> 
> 

Hi!

I've already sent the patch:
https://patchwork.linuxtv.org/project/linux-media/patch/20210506121211.8556-1-paskripkin@gmail.com/


With regards,
Pavel Skripkin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ