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] [day] [month] [year] [list]
Message-ID: <499ADD28.3060806@trash.net>
Date:	Tue, 17 Feb 2009 16:52:08 +0100
From:	Patrick McHardy <kaber@...sh.net>
To:	Pablo Neira Ayuso <pablo@...filter.org>
CC:	netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH] netlink: add NETLINK_BROADCAST_ERROR socket option

Pablo Neira Ayuso wrote:
> Patrick McHardy wrote:
>>> @@ -994,13 +995,15 @@ static inline int do_one_broadcast(struct sock *sk,
>>>      if (p->skb2 == NULL) {
>>>          netlink_overrun(sk);
>>>          /* Clone failed. Notify ALL listeners. */
>>> -        p->failure = 1;
>>> +        if (nlk->flags & NETLINK_BROADCAST_SEND_ERROR)
>>> +            p->failure = 1;
>> Almost :) If we didn't manage to clone, we can't deliver to *any*
>> socket, so the check in the first chunk above is incorrect. It
>> needs to always call netlink_overrun(), additionally it needs to
>> set delivery_failure when the SEND_ERROR flag is present.
> 
> Hm, I'm getting lost with this :), I thought that we agreed that sockets
> without the flag set should not skip.

Right, but you don't have a choice in that case as you don't
even have the first skb cloned. It will crash.

>> Something like this:
>>
>>      if (p->failure) {
>>  +        if (nlk->flags & NETLINK_BROADCAST_SEND_ERROR)
>>  +            p->delivery_failure = 1;
> 
> Then, I think that the previous patch that I sent should be OK
> (including the flag renaming, of course), because p->delivery_failure is
> set if delivery failed and p->failure is set when clone failed. In any
> case, (p->failure || p->delivery_failure) results in a error report, so
> this would not change anything.

The last one set p->failure for a deliver failure. It
should set p->delivery_failure, otherwise you *do*
start skipping other sockets.
--
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