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: <c4a54cac-89be-157e-d158-46ba3488ccc2@gmail.com>
Date:   Mon, 5 Nov 2018 12:57:21 -0700
From:   David Ahern <dsahern@...il.com>
To:     Toralf Förster <toralf.foerster@....de>,
        netdev@...r.kernel.org
Cc:     Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: may I ignore "net/core/rtnetlink.c:3156:1: warning: the frame
 size of 1280 bytes ..."?

On 11/4/18 9:14 AM, Toralf Förster wrote:
> compiling recent kernel (4.18.x, 4.19.1) at my server I do still get :
> 
> 
> net/core/rtnetlink.c: In function ‘rtnl_newlink’:
> net/core/rtnetlink.c:3156:1: warning: the frame size of 1280 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> 
> 
> with "gcc version 7.3.0 (Gentoo Hardened 7.3.0-r3 p1.4) " and do wonder whether it is safe to ignore it?
> 
> 

I believe the warning is coming from this part of rtnl_newlink():

        if (1) {
                struct nlattr *attr[RTNL_MAX_TYPE + 1];
                struct nlattr *slave_attr[RTNL_SLAVE_MAX_TYPE + 1];
                struct nlattr **data = NULL;
                struct nlattr **slave_data = NULL;
                struct net *dest_net, *link_net = NULL;

The heavy hitters are:
#define RTNL_MAX_TYPE           49
#define RTNL_SLAVE_MAX_TYPE     36

attr and slave_attr would amount to 696 bytes of that 1280. The earlier
defined:

struct nlattr *tb[IFLA_MAX+1];

Would be another 416, so those 3 are 1112 bytes of the warning.

I have been using CONFIG_FRAME_WARN=2048 for a while without a problem.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ