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: <4c0f8e0aa1ed0b84bf7074bd963fcaec96eff515.camel@sipsolutions.net>
Date:   Wed, 19 Oct 2022 10:01:04 +0200
From:   Johannes Berg <johannes@...solutions.net>
To:     Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net
Cc:     netdev@...r.kernel.org, edumazet@...gle.com, pabeni@...hat.com,
        jiri@...nulli.us, razor@...ckwall.org, nicolas.dichtel@...nd.com,
        gnault@...hat.com, jacob.e.keller@...el.com, fw@...len.de
Subject: Re: [PATCH net-next 04/13] genetlink: load policy based on
 validation flags

On Tue, 2022-10-18 at 16:07 -0700, Jakub Kicinski wrote:
> Set the policy and maxattr pointers based on validation flags.


I feel like you could have more commit message here

>  	ops = ctx->ops;
> -	if (ops->validate & GENL_DONT_VALIDATE_DUMP)
> -		goto no_attrs;
> -
> -	if (ctx->nlh->nlmsg_len < nlmsg_msg_size(ctx->hdrlen))
> +	if (!(ops->validate & GENL_DONT_VALIDATE_DUMP) &&
> +	    ctx->nlh->nlmsg_len < nlmsg_msg_size(ctx->hdrlen))
>  		return -EINVAL;
>  
>  	attrs = genl_family_rcv_msg_attrs_parse(ctx->family, ctx->nlh, ctx->extack,

especially since this actually changes things to *have* the attrs, but
not have *validated* them, which feels a bit strange and error-prone in
the future maybe?

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ