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]
Date:	Tue, 16 Aug 2016 16:01:50 +0000
From:	David Laight <David.Laight@...LAB.COM>
To:	'Xin Long' <lucien.xin@...il.com>
CC:	David Miller <davem@...emloft.net>,
	network dev <netdev@...r.kernel.org>,
	"linux-sctp@...r.kernel.org" <linux-sctp@...r.kernel.org>,
	"Marcelo Ricardo Leitner" <marcelo.leitner@...il.com>,
	Vladislav Yasevich <vyasevich@...il.com>,
	"daniel@...earbox.net" <daniel@...earbox.net>
Subject: RE: [PATCH net] sctp: fix a success return may hide an error

From: Xin Long
> Sent: 16 August 2016 12:34
>
> >> Both sctp_outq_flush_rtx and sctp_packet_transmit can ONLY
> >> return one error (-ENOMEM), as sctp_outq_flush_rtx also calls
> >> sctp_packet_transmit.
> >
> > What is the effect of the error?
> > If it is 'just' equivalent to a lost ethernet packet (and the skb (etc)
> > is freed) then the protocol will recover.
> > If it is anything else then the error path is probably wrong.
>
> This err returns back to sctp_sendmsg, there sctp will abort asoc.

That doesn't seem a good idea.
You don't want to abort the association if there is a transient
memory allocation failure.
You also can't drop data chunks.

> in this function, sctp tries to do 3 things:
> 1. flush rtx queue
> 2. transmit the packet of current transport
> 3. flush all the transports.
> Now sctp would do them one by one, even if one of them returns err.

You probably need to explain what 'flush' means here.
I think it means 'process and send', but it might mean 'discard the
contents of'.

Last time I looked at the sctp code my head exploded.
ISTR it is a mess of timing errors waiting to happen
(and I write comms protocol stack code for a living).

	David

Powered by blists - more mailing lists