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: <0db3e8c07fd6a9ec933d62cb045b181d7c832d90.camel@sipsolutions.net>
Date:   Thu, 26 Mar 2020 22:13:19 +0100
From:   Johannes Berg <johannes@...solutions.net>
To:     David Ahern <dsahern@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Yafang Shao <laoar.shao@...il.com>
Cc:     bsingharora@...il.com, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org, "David S.Miller" <davem@...emloft.net>
Subject: Re: [PATCH] kernel/taskstats: fix wrong nla type for
 {cgroup,task}stats policy

On Thu, 2020-03-26 at 15:11 -0600, David Ahern wrote:
> 
> >         na->nla_len = nla_len + 1 + NLA_HDRLEN;
> > 
> > // but this??? the nla_len of a netlink attribute should just be
> > // the len ... what's NLA_HDRLEN doing here? this isn't nested
> > // here we end up just reserving 1+NLA_HDRLEN too much space

[...]

> I do not get the error message with this change as Johannes points out
> above:
> 
> diff --git a/tools/accounting/getdelays.c b/tools/accounting/getdelays.c
> index 8cb504d30384..e90fd133df0e 100644
> --- a/tools/accounting/getdelays.c
> +++ b/tools/accounting/getdelays.c
> @@ -136,7 +136,7 @@ static int send_cmd(int sd, __u16 nlmsg_type, __u32
> nlmsg_pid,
>         msg.g.version = 0x1;
>         na = (struct nlattr *) GENLMSG_DATA(&msg);
>         na->nla_type = nla_type;
> -       na->nla_len = nla_len + 1 + NLA_HDRLEN;
> +       na->nla_len = nla_len + NLA_HDRLEN;

Oops, thanks for the correction - indeed NLA_HDRLEN is included, I was
wrong above.

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ