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: <47C7FF31.1060108@trash.net>
Date:	Fri, 29 Feb 2008 13:48:49 +0100
From:	Patrick McHardy <kaber@...sh.net>
To:	Pavel Emelyanov <xemul@...nvz.org>
CC:	David Miller <davem@...emloft.net>,
	Linux Netdev List <netdev@...r.kernel.org>,
	Bart De Schuymer <bdschuym@...dora.be>,
	Netfilter Development Mailinglist 
	<netfilter-devel@...r.kernel.org>
Subject: Re: [PATCH (resend)][EBTABLES]: Fix alignment checks in ebt_among.ko
 module.

Pavel Emelyanov wrote:
> I've sent this patch some days ago to Bart, but with no answer...
> 
> When trying to do
> 
> 	# ebtables -A FORWARD --among-src 0:12:34:56:78:9a=192.168.0.10 -j ACCEPT
> 
> on x86_64 box the ebt_among->check() callback warns me that
> 
> 	ebtables: among: wrong size: 1060 against expected 1056, rounded to 1056
> 
> Checking the ebtables sources, I found that the alignment is done
> differently in the tool and the kernel. Tool makes it like this:
> 
> 	EBT_ALIGN(sizeof(struct ebt_among_info)) + X
> 
> while the kernel module like this:
> 
> 	EBT_ALIGN(sizeof(struct ebt_among_info) + X)
> 
> So the suggested fix is to move the alignment in the kernel. After
> the fix the rule is added and appears in the ebtables -L output.


It seems the kernel is correct and userspace is doing it
wrong, so I think userspace should be fixed instead.
The problem with your patch is that is causes misalignment
for following structures that contain u64 members.


--
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