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: <SJ0PR11MB5008190809F138650A2951C8D7D39@SJ0PR11MB5008.namprd11.prod.outlook.com>
Date:   Fri, 20 May 2022 18:12:43 +0000
From:   "Kumar, M Chetan" <m.chetan.kumar@...el.com>
To:     Jakub Kicinski <kuba@...nel.org>,
        "davem@...emloft.net" <davem@...emloft.net>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        linuxwwan <linuxwwan@...el.com>,
        "loic.poulain@...aro.org" <loic.poulain@...aro.org>,
        "ryazanov.s.a@...il.com" <ryazanov.s.a@...il.com>,
        "johannes@...solutions.net" <johannes@...solutions.net>
Subject: RE: [PATCH net-next] wwan: iosm: use a flexible array rather than
 allocate short objects

> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Friday, May 20, 2022 11:34 AM
> To: davem@...emloft.net
> Cc: netdev@...r.kernel.org; edumazet@...gle.com; pabeni@...hat.com;
> Kumar, M Chetan <m.chetan.kumar@...el.com>; linuxwwan
> <linuxwwan@...el.com>; loic.poulain@...aro.org; ryazanov.s.a@...il.com;
> johannes@...solutions.net
> Subject: Re: [PATCH net-next] wwan: iosm: use a flexible array rather than
> allocate short objects
> 
> On Thu, 19 May 2022 23:00:13 -0700 Jakub Kicinski wrote:
> > GCC array-bounds warns that ipc_coredump_get_list() under-allocates
> > the size of struct iosm_cd_table *cd_table.
> >
> > This is avoidable - we just need a flexible array. Nothing calls
> > sizeof() on struct iosm_cd_list or anything that contains it.
> >
> > Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> 
> Coincidentally IDK if this:
> 
> int ipc_coredump_get_list(struct iosm_devlink *devlink, u16 cmd)
> 
> 	if (byte_read != MAX_CD_LIST_SIZE)
> 		goto cd_init_fail;
> 
> shouldn't set ret before jumping? Maybe set it to 0 if it's okay for it to be zero
> to make that clear?

This is a redundant check we can remove it.
If the byte_read is less than MAX_CD_LIST_SIZE an error is returned as part of previous ret
check.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ