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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171123130930.6efd6291@xeon-e3>
Date:   Thu, 23 Nov 2017 13:09:30 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Jamal Hadi Salim <jhs@...atatu.com>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH iproute2 1/1] actions: Add support for user cookies

On Sat, 22 Apr 2017 08:36:23 -0400
Jamal Hadi Salim <jhs@...atatu.com> wrote:

> +
> +			if (*argv && strcmp(*argv, "cookie") == 0) {
> +				size_t slen;
> +
> +				NEXT_ARG();
> +				slen = strlen(*argv);
> +				if (slen > TC_COOKIE_MAX_SIZE * 2) {
> +					char cookie_err_m[128];
> +
> +					snprintf(cookie_err_m, 128,
> +						 "%zd Max allowed size %d",
> +						 slen, TC_COOKIE_MAX_SIZE*2);
> +					invarg(cookie_err_m, *argv);

Don't bother going to effort of building a string for invarg(). Instead either
just print invalid cookie or use fprintf.

Also, what if kernel limits change? 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ