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: <20230419181824.10119070@kernel.org>
Date:   Wed, 19 Apr 2023 18:18:24 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Kees Cook <keescook@...omium.org>
Cc:     Xin Long <lucien.xin@...il.com>,
        network dev <netdev@...r.kernel.org>,
        linux-sctp@...r.kernel.org, davem@...emloft.net,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Subject: Re: [PATCH net-next 0/6] sctp: fix a plenty of
 flexible-array-nested warnings

On Wed, 19 Apr 2023 11:16:27 -0400 Xin Long wrote:
> Paolo noticed a compile warning in SCTP,
> 
> ../net/sctp/stream_sched_fc.c: note: in included file (through ../include/net/sctp/sctp.h):
> ../include/net/sctp/structs.h:335:41: warning: array of flexible structures
> 
> But not only this, there are actually quite a lot of such warnings in
> some SCTP structs. This patchset fixes most of warnings by deleting
> these nested flexible array members.
> 
> After this patchset, there are still some warnings left:
> 
>   # make C=2 CF="-Wflexible-array-nested" M=./net/sctp/
>   ./include/net/sctp/structs.h:1145:41: warning: nested flexible array
>   ./include/uapi/linux/sctp.h:641:34: warning: nested flexible array
>   ./include/uapi/linux/sctp.h:643:34: warning: nested flexible array
>   ./include/uapi/linux/sctp.h:644:33: warning: nested flexible array
>   ./include/uapi/linux/sctp.h:650:40: warning: nested flexible array
>   ./include/uapi/linux/sctp.h:653:39: warning: nested flexible array
> 
> the 1st is caused by __data[] in struct ip_options, not in SCTP;
> the others are in uapi, and we should not touch them.
> 
> Note that instead of completely deleting it, we just leave it as a
> comment in the struct, signalling to the reader that we do expect
> such variable parameters over there, as Marcelo suggested.

Hi Kees, is there no workaround for nested flexible arrays within 
the kernel?  Any recommendations?

https://lore.kernel.org/all/cover.1681917361.git.lucien.xin@gmail.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ