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: <20170430.224306.1606724319950001833.davem@davemloft.net>
Date:   Sun, 30 Apr 2017 22:43:06 -0400 (EDT)
From:   David Miller <davem@...emloft.net>
To:     brouer@...hat.com
Cc:     kafai@...com, netdev@...r.kernel.org, eric@...it.org,
        borkmann@...earbox.net, alexei.starovoitov@...il.com
Subject: Re: [net-next PATCH V1] samples/bpf: bpf_load.c detect and abort
 if ELF maps section size is wrong

From: Jesper Dangaard Brouer <brouer@...hat.com>
Date: Fri, 28 Apr 2017 16:25:04 +0200

> The struct bpf_map_def was extended in commit fb30d4b71214 ("bpf: Add tests
> for map-in-map") with member unsigned int inner_map_idx.  This changed the size
> of the maps section in the generated ELF _kern.o files.
> 
> Unfortunately the loader in bpf_load.c does not detect or handle this.  Thus,
> older _kern.o files became incompatible, and caused hard-to-debug errors
> where the syscall validation rejected BPF_MAP_CREATE request.
> 
> This patch only detect the situation and aborts load_bpf_file(). It also
> add code comments warning people that read this loader for inspiration
> for these pitfalls.
> 
> Fixes: fb30d4b71214 ("bpf: Add tests for map-in-map")
> Signed-off-by: Jesper Dangaard Brouer <brouer@...hat.com>

Applied.

Powered by blists - more mailing lists