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: <562D48FD.9030901@wiesinger.com>
Date:	Sun, 25 Oct 2015 22:26:21 +0100
From:	Gerhard Wiesinger <lists@...singer.com>
To:	Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>
Cc:	Willy Tarreau <w@....eu>,
	Linux Kernel Network Developers <netdev@...r.kernel.org>,
	netfilter-devel@...r.kernel.org,
	Greg KH <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	torvalds@...ux-foundation.org, stable@...r.kernel.org, lwn@....net,
	Jiri Slaby <jslaby@...e.cz>
Subject: Re: Linux 4.2.4

On 25.10.2015 21:08, Gerhard Wiesinger wrote:
> On 25.10.2015 20:46, Jozsef Kadlecsik wrote:
>> Hi,
>>
>> On Sun, 25 Oct 2015, Gerhard Wiesinger wrote:
>>
>>> On 25.10.2015 10:46, Willy Tarreau wrote:
>>>> ipset *triggered* the problem. The whole stack dump would tell more.
>>> OK, find the stack traces in the bug report:
>>> https://bugzilla.redhat.com/show_bug.cgi?id=1272645
>>>
>>> Kernel 4.1.10 triggered also a kernel dump when playing with ipset 
>>> commands
>>> and IPv6, details in the bug report  ....
>> It seems to me it is an architecture-specific alignment issue. I don't
>> have a Cortex-A7 ARM hardware and qemu doesn't seem to support it 
>> either,
>> so I'm unable to reproduce it (ipset passes all my tests on my hardware,
>> including more complex ones than what breaks here). My first wild 
>> guess is
>> that the dynamic array of the element structure is not aligned properly.
>> Could you give a try to the next patch?
>>
>> diff --git a/net/netfilter/ipset/ip_set_hash_gen.h 
>> b/net/netfilter/ipset/ip_set_hash_gen.h
>> index afe905c..1cf357d 100644
>> --- a/net/netfilter/ipset/ip_set_hash_gen.h
>> +++ b/net/netfilter/ipset/ip_set_hash_gen.h
>> @@ -1211,6 +1211,9 @@ static const struct ip_set_type_variant 
>> mtype_variant = {
>>       .same_set = mtype_same_set,
>>   };
>>   +#define IP_SET_BASE_ALIGN(dtype)    \
>> +    ALIGN(sizeof(struct dtype), __alignof__(struct dtype))
>> +
>>   #ifdef IP_SET_EMIT_CREATE
>>   static int
>>   IPSET_TOKEN(HTYPE, _create)(struct net *net, struct ip_set *set,
>> @@ -1319,12 +1322,12 @@ IPSET_TOKEN(HTYPE, _create)(struct net *net, 
>> struct ip_set *set,
>>   #endif
>>           set->variant = &IPSET_TOKEN(HTYPE, 4_variant);
>>           set->dsize = ip_set_elem_len(set, tb,
>> -                sizeof(struct IPSET_TOKEN(HTYPE, 4_elem)));
>> +                IP_SET_BASE_ALIGN(IPSET_TOKEN(HTYPE, 4_elem)));
>>   #ifndef IP_SET_PROTO_UNDEF
>>       } else {
>>           set->variant = &IPSET_TOKEN(HTYPE, 6_variant);
>>           set->dsize = ip_set_elem_len(set, tb,
>> -                sizeof(struct IPSET_TOKEN(HTYPE, 6_elem)));
>> +                IP_SET_BASE_ALIGN(IPSET_TOKEN(HTYPE, 6_elem)));
>>       }
>>   #endif
>>       if (tb[IPSET_ATTR_TIMEOUT]) {
>>
>> If that does not solve it, then could you help to narrow down the issue?
>> Does the bug still appear if your remove the counter extension of the 
>> set?
>>
>
> Hello Jozsef,
>
> Patch applied well, compiling ...

Hello Jozsef,

Thank you for the patch it but still  crashes, see: 
https://bugzilla.redhat.com/show_bug.cgi?id=1272645

Any further ideas?

Thank you.

Ciao,
Gerhard

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