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]
Date:   Wed, 29 Mar 2023 19:52:27 +0200
From:   Simon Horman <simon.horman@...igine.com>
To:     Jiasheng Jiang <jiasheng@...as.ac.cn>
Cc:     marcel@...tmann.org, johan.hedberg@...il.com, luiz.dentz@...il.com,
        davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, linux-bluetooth@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: Re: [PATCH v2] Bluetooth: 6LoWPAN: Add missing check for
 skb_clone

On Wed, Mar 29, 2023 at 10:08:10AM +0800, Jiasheng Jiang wrote:
> On Tue, Mar 21, 2023 at 00:09:11AM +0800, Simon Horman wrote:
> >On Mon, Mar 20, 2023 at 02:31:55PM +0800, Jiasheng Jiang wrote:
> >> Return the error when send_pkt fails in order to avoid the error being
> >> overwritten.
> >> Moreover, remove the redundant 'ret'.
> >> 
> >> Fixes: 9c238ca8ec79 ("Bluetooth: 6lowpan: Check transmit errors for multicast packets")
> >> Signed-off-by: Jiasheng Jiang <jiasheng@...as.ac.cn>
> > 
> > I see that the error handling is imperfect - only the most recent
> > error value is returned.
> > 
> > But I think this patch introduces a behavioural change: if
> > an error occurs then no attempt is made to send the
> > multicast packet to devices that follow in the list of peers.
> > 
> > If so, I'd want to be sure that behaviour is desirable.
> 
> I think it's a matter of trade-offs.
> The original error handling can complete the remaining correct tasks.
> However, my patch can avoid resource waste, because if the an
> error occurs, the rest is likely to go wrong.
> For example, if a memory allocation fails because of the insufficient
> memory, the next memory allocation will likely fails too.

I see your point.

> Maybe it is better to use different error handlings depending on the
> type of errors:
> Immediately return "ENOMEM" errors and continue execute if the other errors occur.

Yes, that might be interesting if we can clearly
differentiate between the two types of errors.
Yet, it brings complexity.

Given your explanation, perhaps the best idea is the implementation
provided by this patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ