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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 12 Oct 2017 11:31:34 +1100 (AEDT)
From:   James Morris <james.l.morris@...cle.com>
To:     Chenbo Feng <chenbofeng.kernel@...il.com>
cc:     netdev@...r.kernel.org, SELinux <Selinux@...ho.nsa.gov>,
        linux-security-module@...r.kernel.org,
        Jeffrey Vander Stoep <jeffv@...gle.com>,
        Lorenzo Colitti <lorenzo@...gle.com>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Chenbo Feng <fengc@...gle.com>
Subject: Re: [PATCH net-next 2/4] security: bpf: Add LSM hooks for bpf object
 related syscall

On Wed, 4 Oct 2017, Chenbo Feng wrote:

>  int bpf_map_new_fd(struct bpf_map *map, int flags)
>  {
> +	if (security_bpf_map(map, OPEN_FMODE(flags)))
> +		return -EPERM;
> +

Don't hardcode -EPERM here, return the actual error from 
security_bpf_map().

> +	if (security_bpf_prog(prog))
> +		return -EPERM;
> +

Same.

> +	err = security_bpf(cmd, &attr, size);
> +	if (err)
> +		return -EPERM;

Same.


- James

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ