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:	Thu, 13 Mar 2014 13:24:46 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	dborkman@...hat.com
Cc:	netdev@...r.kernel.org, linux-sctp@...r.kernel.org,
	davej@...hat.com, dan.carpenter@...cle.com
Subject: Re: [PATCH net-next] net: sctp: remove NULL check in
 sctp_assoc_update_retran_path

From: Daniel Borkmann <dborkman@...hat.com>
Date: Thu, 13 Mar 2014 14:45:26 +0100

> This is basically just to let Coverity et al shut up. Remove an
> unneeded NULL check in sctp_assoc_update_retran_path().
> 
> It is safe to remove it, because in sctp_assoc_update_retran_path()
> we iterate over the list of transports, our own transport which is
> asoc->peer.retran_path included. In the iteration, we skip the
> list head element and transports in state SCTP_UNCONFIRMED.
> 
> Such transports came from peer addresses received in INIT/INIT-ACK
> address parameters. They are not yet confirmed by a heartbeat and
> not available for data transfers.
> 
> We know however that in the list of transports, even if it contains
> such elements, it at least contains our asoc->peer.retran_path as
> well, so even if next to that element, we only encounter
> SCTP_UNCONFIRMED transports, we are always going to fall back to
> asoc->peer.retran_path through sctp_trans_elect_best(), as that is
> for sure not SCTP_UNCONFIRMED as per fbdf501c9374 ("sctp: Do no
> select unconfirmed transports for retransmissions").
> 
> Whenever we call sctp_trans_elect_best() it will give us a non-NULL
> element back, and therefore when we break out of the loop, we are
> guaranteed to have a non-NULL transport pointer, and can remove
> the NULL check.
> 
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> Reported-by: Dave Jones <davej@...hat.com>
> Signed-off-by: Daniel Borkmann <dborkman@...hat.com>

Applied, thanks Daniel.
--
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