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: <20140509133424.7dc93da3@nehalam.linuxnetplumber.net>
Date:	Fri, 9 May 2014 13:34:24 -0700
From:	Stephen Hemminger <stephen@...workplumber.org>
To:	andreas.greve@...reve.de
Cc:	netdev@...r.kernel.org
Subject: Re: Bug: tc filter show .... raise segfault if more than one rule
 with action -j MARK exist

On Thu, 08 May 2014 13:48:19 +0200
Andreas Greve <andreas.greve@...reve.de> wrote:

> +	/* 
> +	   clone tcipt_globals because .opts and .options_offset  will be modified later and not 
> +           restored by iptables. If tcipt_globals is not cloned the modification tcipt_globals will 
> +           cause a segmentation fault if more than one filter rule  with action -j  exists.
> +        */
> +	struct xtables_globals tmp_tcipt_globals;
> +	memcpy (&tmp_tcipt_globals, &tcipt_globals, sizeof(struct xtables_globals) );
> +

Please use structure assignment instead of memcpy().
Structure assignment makes sure that types match. mempcpy does not.
--
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