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: <874mr1isch.fsf@nemi.mork.no>
Date:	Wed, 04 Feb 2015 16:55:42 +0100
From:	Bjørn Mork <bjorn@...k.no>
To:	Johannes Berg <johannes@...solutions.net>
Cc:	netdev@...r.kernel.org, Jeff Layton <jeff.layton@...marydata.com>,
	Sedat Dilek <sedat.dilek@...il.com>
Subject: Re: [PATCH v3 2/3] genetlink: disallow subscribing to unknown mcast groups

Johannes Berg <johannes@...solutions.net> writes:

> On Wed, 2015-02-04 at 16:36 +0100, Bjørn Mork wrote:
>
>> >> -	int i, err = 0;
>> >> +	int i, err = -ENOENT;
>> >>  
>> >>  	down_read(&cb_lock);
>> >>  	for (i = 0; i < GENL_FAM_TAB_SIZE; i++) {
>> >
>> > This change cause serious problems for acpid, as reported on
>> > https://bugzilla.kernel.org/show_bug.cgi?id=92121
>> 
>> Ah, I see this bug is already fixed by commit 8b7c36d810c6 ("netlink:
>> fix wrong subscription bitmask to group mapping in").  Your change was
>> obviously correct, and found the long standing off by one bug.  Thanks.
>> 
>> Sorry about the noise.  I should have checked the current "net" first.
>
> Interesting. I was completely willing to entertain the notion that some
> userspace might be broken and be attempting to subscribe to a (static
> through the hacks we had to put in or "I think I know it already")
> group.

Me to.  So I went through the whole loop, checking that acpid did
everything by the book, adding a debug message to genl_bind() only to
see that it was called with '1' instead of the expected '2'.  Then
looking at af_netlink.c and its history. Etc.

> Have you checked acpid with the bitmap fix?

No, not yet. But I went down far enough into this that I actually wrote
the exact same patch as Pablo. Had to scratch my head when I couldn't
cherry-pick it into net because it was already there :-)

So I am pretty sure Pablo's patch fixes the problem.

This was never noticed before because there are only two users,
netfilter and generic netlink,  and both were willing to accept the
off-by-one values without much fuzz.


Bjørn
--
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