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
| ||
|
Date: Tue, 23 Aug 2016 12:54:41 -0600 From: David Ahern <dsa@...ulusnetworks.com> To: Lorenzo Colitti <lorenzo@...gle.com>, netdev@...r.kernel.org Cc: eric.dumazet@...il.com, davem@...emloft.net Subject: Re: [PATCH net-next 2/2] net: diag: allow socket bytecode filters to match socket marks On 8/23/16 12:06 PM, Lorenzo Colitti wrote: > @@ -713,10 +728,11 @@ static bool valid_markcond(const struct inet_diag_bc_op *op, int len, > return len >= *min_len; > } > > -static int inet_diag_bc_audit(struct nlattr *attr) > +static int inet_diag_bc_audit(struct nlattr *attr, const struct sk_buff *skb) > { > const void *bytecode, *bc; > int bytecode_len, len; > + bool net_admin = netlink_net_capable(skb, CAP_NET_ADMIN); > > if (!attr || nla_len(attr) < sizeof(struct inet_diag_bc_op)) > return -EINVAL; The net_admin arg should be added as the first local to maintain preference for reverse xmas tree order.
Powered by blists - more mailing lists