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]
Date:   Fri, 1 Jun 2018 15:06:18 -0700
From:   Kees Cook <keescook@...omium.org>
To:     kbuild test robot <lkp@...el.com>,
        Richard Weinberger <richard@....at>,
        Jeff Dike <jdike@...toit.com>,
        Ramkumar Ramachandra <artagnon@...il.com>
Cc:     kbuild-all@...org, Network Development <netdev@...r.kernel.org>
Subject: Re: [net-next:master 375/376] net/core/rtnetlink.c:3099:1: warning:
 the frame size of 1280 bytes is larger than 1024 bytes

On Thu, May 31, 2018 at 10:07 PM, kbuild test robot <lkp@...el.com> wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
> head:   4b8e6ac41a594ea67ded6af6af5935f03221ea4c
> commit: ccf8dbcd062a930e64741c939ca784d15316aa0c [375/376] rtnetlink: Remove VLA usage
> config: um-x86_64_defconfig (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
> reproduce:
>         git checkout ccf8dbcd062a930e64741c939ca784d15316aa0c
>         # save the attached .config to linux build tree
>         make ARCH=um SUBARCH=x86_64
>
> All warnings (new ones prefixed by >>):
>
>    net/core/rtnetlink.c: In function 'rtnl_newlink':
>>> net/core/rtnetlink.c:3099:1: warning: the frame size of 1280 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>     }
>     ^

The recent removal of the VLA has exposed how large it's possible for
this stack allocation to get (i.e. it was hidden from the checker
before because it was a VLA). This warning doesn't trip on regular
x86_64 because the -Wframe-larger-than is 2048. It seems like 64-bit
um should have the same 64-bit value (instead of using the 32-bit
value):

arch/um/configs/x86_64_defconfig:CONFIG_FRAME_WARN=1024

lib/Kconfig.debug:
config FRAME_WARN
        int "Warn for stack frames larger than (needs gcc 4.4)"
        range 0 8192
        default 3072 if KASAN_EXTRA
        default 2048 if GCC_PLUGIN_LATENT_ENTROPY
        default 1280 if (!64BIT && PARISC)
        default 1024 if (!64BIT && !PARISC)
        default 2048 if 64BIT

Just dropping the defconfig there should fix it. (And I think it was
just a mistake to port that value when splitting the um defconfig in
commit e40f04d040c6 ("arch/um: make it work with defconfig and
x86_64").

-Kees

-- 
Kees Cook
Pixel Security

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ