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:	Mon, 30 Sep 2013 21:10:41 -0700
From:	Stephen Hemminger <stephen@...workplumber.org>
To:	Fan Du <fan.du@...driver.com>
Cc:	Sohny Thomas <sthomas@...ux.vnet.ibm.com>,
	David Laight <David.Laight@...lab.com>,
	<netdev@...r.kernel.org>
Subject: Re: [PATCH] {iproute2, xfrm}: Use memcpy to suppress gcc phony
 buffer overflow warning


> diff --git a/ip/xfrm_state.c b/ip/xfrm_state.c
> index 0d98e78..5cc87d3 100644
> --- a/ip/xfrm_state.c
> +++ b/ip/xfrm_state.c
> @@ -159,7 +159,7 @@ static int xfrm_algo_parse(struct xfrm_algo *alg, enum xfrm_attr_type_t type,
>   			if (len > max)
>   				invarg("\"ALGO-KEY\" makes buffer overflow\n", key);
> 
> -			strncpy(buf, key, len);
> +			memcpy(buf, key, len);
>   		}
>   	}
> 

Applied this patch. With some edits to make commit message logical.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ