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]
Date:   Tue, 23 Aug 2016 11:31:27 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Lorenzo Colitti <lorenzo@...gle.com>
Cc:     netdev@...r.kernel.org, dsa@...ulusnetworks.com,
        davem@...emloft.net
Subject: Re: [PATCH net-next 1/2] net: diag: slightly refactor the
 inet_diag_bc_audit error checks.

On Wed, 2016-08-24 at 03:06 +0900, Lorenzo Colitti wrote:
> This simplifies the code a bit and also allows inet_diag_bc_audit
> to send to userspace an error that isn't EINVAL.
> 
> Signed-off-by: Lorenzo Colitti <lorenzo@...gle.com>
> ---
>  net/ipv4/inet_diag.c | 35 ++++++++++++++++++++++++-----------
>  1 file changed, 24 insertions(+), 11 deletions(-)
> 
> diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
> index 38c2c47..a835f94 100644
> --- a/net/ipv4/inet_diag.c
> +++ b/net/ipv4/inet_diag.c
> @@ -706,10 +706,23 @@ static bool valid_port_comparison(const struct inet_diag_bc_op *op,
>  	return true;
>  }
>  
> -static int inet_diag_bc_audit(const void *bytecode, int bytecode_len)
> +static bool valid_markcond(const struct inet_diag_bc_op *op, int len,
> +			   int *min_len)
>  {
> -	const void *bc = bytecode;
> -	int  len = bytecode_len;
> +	*min_len += sizeof(struct inet_diag_markcond);
> +	return len >= *min_len;
> +}

I do not see how this can compile, since you introduce "struct
inet_diag_markcond" in the following patch ?



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ