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: <20190228021958.GA13343@localhost.localdomain>
Date:   Wed, 27 Feb 2019 23:19:58 -0300
From:   Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
To:     David Miller <davem@...emloft.net>
Cc:     netdev@...r.kernel.org, lucien.xin@...il.com, nhorman@...driver.com
Subject: Re: [PATCH RFC v3 4/5] sctp: Make sctp_enqueue_event tak an skb list.

On Wed, Feb 27, 2019 at 05:00:24PM -0800, David Miller wrote:
> 
> Pass this, instead of an event.  Then everything trickles down and we
> always have events a non-empty list.
> 
> Then we needs a list creating stub to place into .enqueue_event for sctp_stream_interleave_1.
> 
> Signed-off-by: David S. Miller <davem@...emloft.net>
> ---
>  net/sctp/stream_interleave.c | 44 +++++++++++++++++++++++++++---------
>  1 file changed, 33 insertions(+), 11 deletions(-)
> 
> diff --git a/net/sctp/stream_interleave.c b/net/sctp/stream_interleave.c
> index b6b251b8b3cf..0bc3d9329d9a 100644
> --- a/net/sctp/stream_interleave.c
> +++ b/net/sctp/stream_interleave.c
...
> @@ -866,11 +867,15 @@ static int sctp_ulpevent_idata(struct sctp_ulpq *ulpq,

More context:
        if (!(event->msg_flags & SCTP_DATA_UNORDERED)) {
                event = sctp_intl_reasm(ulpq, event);       [1]
                if (event && event->msg_flags & MSG_EOR) {  [2]
                        skb_queue_head_init(&temp);
                        __skb_queue_tail(&temp, sctp_event2skb(event));

                        event = sctp_intl_order(ulpq, event);
>  		}
>  	} else {
>  		event = sctp_intl_reasm_uo(ulpq, event);
> +		if (event) {
> +			skb_queue_head_init(&temp);
> +			__skb_queue_tail(&temp, sctp_event2skb(event));
> +		}
>  	}
>  
>  	if (event) {
>  		event_eor = (event->msg_flags & MSG_EOR) ? 1 : 0;
> -		sctp_enqueue_event(ulpq, event);
> +		sctp_enqueue_event(ulpq, &temp);

[1] can return an event without MSG_EOR (a partial delivery), which
would skip the condition on [2] and cause temp to not be initialized
by here.  Same applies to sctp_ulpq_tail_data().

It's the only thing I noticed on the series. Will test it tomorrow.

>  	}
>  
>  	return event_eor;
...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ