Re: [PATCH RESEND][next] sctp: Fix fall-through warnings for Clang

2021-04-20 Thread Marcelo Ricardo Leitner
On Tue, Apr 20, 2021 at 03:09:24PM -0500, Gustavo A. R. Silva wrote: > Hi all, > > Friendly ping: who can take this, please? It would go via net/net-next tree, but I can't find this one on patchwork. Just the previous version. http://patchwork.ozlabs.org/project/netdev/list/?series=&submitter=&s

Re: [PATCH][next] sctp: Fix out-of-bounds warning in sctp_process_asconf_param()

2021-04-16 Thread Marcelo Ricardo Leitner
m/KSPP/linux/issues/109 > Reported-by: kernel test robot > Signed-off-by: Gustavo A. R. Silva Acked-by: Marcelo Ricardo Leitner Thanks.

Re: [PATCH v2] net/sctp: fix race condition in sctp_destroy_sock

2021-04-13 Thread Marcelo Ricardo Leitner
_lock in sctp_destroy_sock > instead of sctp_close. > > This addresses CVE-2021-23133. > > Reported-by: Or Cohen > Reviewed-by: Xin Long > Fixes: 610236587600 ("bpf: Add new cgroup attach type to enable sock > modifications") > Signed-off-by: Or Cohen Thanks folks. Acked-by: Marcelo Ricardo Leitner

Re: [PATCH] net/sctp: fix race condition in sctp_destroy_sock

2021-04-13 Thread Marcelo Ricardo Leitner
On Tue, Apr 13, 2021 at 12:31:53PM +0300, Or Cohen wrote: > +++ b/net/sctp/socket.c > @@ -1520,11 +1520,9 @@ static void sctp_close(struct sock *sk, long timeout) > > /* Supposedly, no process has access to the socket, but >* the net layers still may. > - * Also, sctp_destroy_s

Re: [PATCH AUTOSEL 5.10 09/33] net: correct sk_acceptq_is_full()

2021-04-05 Thread Marcelo Ricardo Leitner
On Mon, Mar 29, 2021 at 06:21:57PM -0400, Sasha Levin wrote: > From: liuyacan > > [ Upstream commit f211ac154577ec9ccf07c15f18a6abf0d9bdb4ab ] > > The "backlog" argument in listen() specifies > the maximom length of pending connections, > so the accept queue should be considered full > if there

Re: [PATCH 3/3] net: fix iteration for sctp transport seq_files

2021-02-05 Thread Marcelo Ricardo Leitner
s. > > So move the sctp_transport_put() call to ->next and ->stop. > > Fixes: 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code and > interface") > Reported-by: Xin Long > Signed-off-by: NeilBrown Acked-by: Marcelo Ricardo Leitner

Re: [PATCH 5.4 29/33] net, sctp, filter: remap copy_from_user failure error

2021-01-22 Thread Marcelo Ricardo Leitner
) > error codes with -EINVAL such that they cannot be probed anymore. Risk of > breakage should be rather low for this particular error case. > > Fixes: 0d01da6afc54 ("bpf: implement getsockopt and setsockopt hooks") > Reported-by: Ryota Shiga (Flatt Security) > Signed-o

Re: "general protection fault in sctp_ulpevent_notify_peer_addr_change" and "general protection fault in sctp_ulpevent_nofity_peer_addr_change" should share the same root cause

2021-01-11 Thread Marcelo Ricardo Leitner
On Tue, Jan 12, 2021 at 10:18:00AM +0800, 慕冬亮 wrote: > Dear developers, > > I find that "general protection fault in l2cap_sock_getsockopt" and > "general protection fault in sco_sock_getsockopt" may be duplicated > bugs from the same root cause. > > First, by comparing the PoC similarity after o

Re: [PATCH] sctp: Fix sending when PMTU is less than SCTP_DEFAULT_MINSEGMENT

2020-11-06 Thread Marcelo Ricardo Leitner
On Fri, Nov 06, 2020 at 10:48:24AM +0100, Petr Malat wrote: > On Fri, Nov 06, 2020 at 05:46:34AM -0300, Marcelo Ricardo Leitner wrote: > > On Thu, Nov 05, 2020 at 11:39:47AM +0100, Petr Malat wrote: > > > Function sctp_dst_mtu() never returns lower MTU than

Re: [PATCH] sctp: Fix sending when PMTU is less than SCTP_DEFAULT_MINSEGMENT

2020-11-06 Thread Marcelo Ricardo Leitner
On Thu, Nov 05, 2020 at 11:39:47AM +0100, Petr Malat wrote: > Function sctp_dst_mtu() never returns lower MTU than > SCTP_TRUNC4(SCTP_DEFAULT_MINSEGMENT) even when the actual MTU is less, > in which case we rely on the IP fragmentation and must enable it. This should be being handled at sctp_packe

Re: [PATCH] sctp: Fix COMM_LOST/CANT_STR_ASSOC err reporting on big-endian platforms

2020-11-02 Thread Marcelo Ricardo Leitner
y: Petr Malat Then, it also needs: Fixes: 978aa0474115 ("sctp: fix some type cast warnings introduced since very beginning")' Acked-by: Marcelo Ricardo Leitner (If the maintainers can't add the Fixes tag above, please keep the ack on the v2) Thanks.

Re: [PATCH 00/13] lib/generic-radix-tree: genradix bug fix and optimisations.

2020-08-25 Thread 'Marcelo Ricardo Leitner'
On Tue, Aug 25, 2020 at 02:52:34PM +, David Laight wrote: > The genradix code is used by SCTP for accessing per-stream data. > This means there are quite a lot of lookups but the code wasn't > really optimised at all. My test box is down for the moment and will bring it on later today or tomor

Re: Oops on current Raspian when closing an SCTP connection

2020-08-17 Thread Marcelo Ricardo Leitner
On Sun, Aug 16, 2020 at 06:06:24PM -0500, Corey Minyard wrote: > I'm seeing the following when an SCTP connection terminates. This is on > Raspian on a Raspberry Pi, version is Linux version 5.4.51-v7+. That's > 32-bit ARM. > > I haven't looked into it yet, I thought I would report before trying

Re: general protection fault in sctp_ulpevent_notify_peer_addr_change

2020-08-10 Thread Marcelo Ricardo Leitner
On Mon, Aug 10, 2020 at 08:37:18AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:fffe3ae0 Merge tag 'for-linus-hmm' of git://git.kernel.org.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=12f34d3a90 > kernel

Re: [PATCH] sctp: remove redundant initialization of variable status

2020-07-24 Thread Marcelo Ricardo Leitner
t; Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King Acked-by: Marcelo Ricardo Leitner Are you willing to send another to patch to fix the var ordering in reverse christmass tree in there? > --- > net/sctp/protocol.c | 2 +- > 1 file changed, 1 insertion(+

Re: KASAN: slab-out-of-bounds Write in sctp_setsockopt

2020-07-22 Thread Marcelo Ricardo Leitner
On Wed, Jul 22, 2020 at 11:22:23AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:4f1b4da5 Merge branch 'net-atlantic-various-features' > git tree: net-next > console output: https://syzkaller.appspot.com/x/log.txt?x=14b3a04090 > kernel config

Re: [PATCH for v5.9] sctp: Replace HTTP links with HTTPS ones

2020-07-20 Thread Marcelo Ricardo Leitner
And yes, *I could* (at least half-)automate it. > Impossible is nothing! :) The subject prefix is right for sctp, but the patch tag should have been "PATCH net-next" instead. :-) Thankfully, they can fix it for us. Acked-by: Marcelo Ricardo Leitner

[PATCH net] sctp: Don't advertise IPv4 addresses if ipv6only is set on the socket

2020-06-24 Thread Marcelo Ricardo Leitner
2-rc2") Reported-by: Corey Minyard Signed-off-by: Marcelo Ricardo Leitner --- include/net/sctp/constants.h | 8 +--- net/sctp/associola.c | 5 - net/sctp/bind_addr.c | 1 + net/sctp/protocol.c | 3 ++- 4 files changed, 12 insertions(+), 5 deletions(-) di

Re: [PATCH] sctp: Don't advertise IPv4 addresses if ipv6only is set on the socket

2020-06-24 Thread Marcelo Ricardo Leitner
On Tue, Jun 23, 2020 at 11:04:17AM -0500, miny...@acm.org wrote: > From: Corey Minyard > > If a socket was set ipv6only, it would still send IPv4 addresses in the > init and init ack packets. So don't add IPv4 addresses to ipv6only > sockets. > > Based on a patch by Xin Long > > Signed-off-by

Re: Strange problem with SCTP+IPv6

2020-06-23 Thread Marcelo Ricardo Leitner
On Tue, Jun 23, 2020 at 11:24:59PM +0200, Michael Tuexen wrote: > > On 23. Jun 2020, at 23:21, Marcelo Ricardo Leitner > > wrote: > > > > On Tue, Jun 23, 2020 at 11:17:56AM -0500, Corey Minyard wrote: > >> On Tue, Jun 23, 2020 at 01:17:28PM +, David Laight w

Re: Strange problem with SCTP+IPv6

2020-06-23 Thread 'Marcelo Ricardo Leitner'
On Tue, Jun 23, 2020 at 11:17:56AM -0500, Corey Minyard wrote: > On Tue, Jun 23, 2020 at 01:17:28PM +, David Laight wrote: > > From: Marcelo Ricardo Leitner > > > Sent: 22 June 2020 19:33 > > > On Mon, Jun 22, 2020 at 08:01:24PM +0200, Michael Tuexen wrote: > >

Re: Strange problem with SCTP+IPv6

2020-06-22 Thread Marcelo Ricardo Leitner
On Mon, Jun 22, 2020 at 08:01:24PM +0200, Michael Tuexen wrote: > > On 22. Jun 2020, at 18:57, Corey Minyard wrote: > > > > On Mon, Jun 22, 2020 at 08:01:23PM +0800, Xin Long wrote: > >> On Sun, Jun 21, 2020 at 11:56 PM Corey Minyard wrote: > >>> > >>> I've stumbled upon a strange problem with

Re: [PATCH 4/4] net: remove kernel_setsockopt

2020-05-29 Thread Marcelo Ricardo Leitner
On Fri, May 29, 2020 at 02:09:43PM +0200, Christoph Hellwig wrote: > No users left. > > Signed-off-by: Christoph Hellwig Reviewed-by: Marcelo Ricardo Leitner Thanks. > --- > include/linux/net.h | 2 -- > net/socket.c| 31 --- >

Re: [PATCH 3/4] net: add a new bind_add method

2020-05-29 Thread Marcelo Ricardo Leitner
itch the dlm code to use the method instead of going through the > socket option from kernel space. > > Signed-off-by: Christoph Hellwig Acked-by: Marcelo Ricardo Leitner Even though checkpatch complained about bad alignment here: > +static int sctp_bind_add(struct sock *sk

Re: [PATCH 2/4] sctp: refactor sctp_setsockopt_bindx

2020-05-29 Thread Marcelo Ricardo Leitner
f-by: Christoph Hellwig Acked-by: Marcelo Ricardo Leitner > --- > net/sctp/socket.c | 61 ++- > 1 file changed, 28 insertions(+), 33 deletions(-) > > diff --git a/net/sctp/socket.c b/net/sctp/socket.c > index 827a9903ee288..6e74

Re: [PATCH 1/4] sctp: add sctp_sock_set_nodelay

2020-05-29 Thread Marcelo Ricardo Leitner
On Fri, May 29, 2020 at 02:09:40PM +0200, Christoph Hellwig wrote: > Add a helper to directly set the SCTP_NODELAY sockopt from kernel space > without going through a fake uaccess. > > Signed-off-by: Christoph Hellwig Acked-by: Marcelo Ricardo Leitner I'm taking the ac

Re: [PATCH v2] sctp: check assoc before SCTP_ADDR_{MADE_PRIM,ADDED} event

2020-05-27 Thread Marcelo Ricardo Leitner
ess that is > part of an existing association has experienced a change of > state (e.g., a failure or return to service of the reachability > of an endpoint via a specific transport address). > > Signed-off-by: Jonas Falkevik Acked-by: Marcelo Ricardo Leitner Thanks! > --- >

Re: [PATCH] net: sctp: Fix spelling in Kconfig help

2020-05-25 Thread Marcelo Ricardo Leitner
On Tue, May 26, 2020 at 10:55:59AM +1200, Chris Packham wrote: > Change 'handeled' to 'handled' in the Kconfig help for SCTP. > > Signed-off-by: Chris Packham Acked-by: Marcelo Ricardo Leitner

Re: [PATCH] sctp: check assoc before SCTP_ADDR_{MADE_PRIM,ADDED} event

2020-05-25 Thread Marcelo Ricardo Leitner
On Mon, May 25, 2020 at 10:49:06PM +0200, Jonas Falkevik wrote: > On Mon, May 25, 2020 at 6:10 PM Xin Long wrote: > > > > On Mon, May 25, 2020 at 9:10 PM Marcelo Ricardo Leitner > > wrote: > > > > > > On Mon, May 25, 2020 at 04:42:16PM +0800, Xin Long wrot

Re: [PATCH] sctp: check assoc before SCTP_ADDR_{MADE_PRIM,ADDED} event

2020-05-25 Thread Marcelo Ricardo Leitner
On Mon, May 25, 2020 at 04:42:16PM +0800, Xin Long wrote: > On Sat, May 23, 2020 at 8:04 PM Jonas Falkevik > wrote: > > > > On Tue, May 19, 2020 at 10:42 PM Marcelo Ricardo Leitner > > wrote: > > > > > > On Fri, May 15, 2020 at 10:30:29AM +0200, Jo

Re: [PATCH 32/33] net: add a new bind_add method

2020-05-21 Thread Marcelo Ricardo Leitner
On Thu, May 21, 2020 at 10:42:24AM +0200, Christoph Hellwig wrote: > On Wed, May 20, 2020 at 08:00:25PM -0300, Marcelo Ricardo Leitner wrote: > > > + if (err) > > > + return err; > > > + > > > + lock_sock(sk); > > > + err = sctp_do_bi

Re: [PATCH 31/33] sctp: add sctp_sock_set_nodelay

2020-05-21 Thread Marcelo Ricardo Leitner
On Thu, May 21, 2020 at 10:34:42AM +0200, Christoph Hellwig wrote: > On Wed, May 20, 2020 at 08:39:13PM -0300, Marcelo Ricardo Leitner wrote: > > On Wed, May 20, 2020 at 04:23:55PM -0700, David Miller wrote: > > > From: Marcelo Ricardo Leitner > > > Date: Wed,

Re: [PATCH 31/33] sctp: add sctp_sock_set_nodelay

2020-05-20 Thread Marcelo Ricardo Leitner
On Wed, May 20, 2020 at 04:23:55PM -0700, David Miller wrote: > From: Marcelo Ricardo Leitner > Date: Wed, 20 May 2020 20:10:01 -0300 > > > The duplication with sctp_setsockopt_nodelay() is quite silly/bad. > > Also, why have the 'true' hardcoded? It's what

Re: [PATCH 31/33] sctp: add sctp_sock_set_nodelay

2020-05-20 Thread Marcelo Ricardo Leitner
On Wed, May 20, 2020 at 09:55:07PM +0200, Christoph Hellwig wrote: > Add a helper to directly set the SCTP_NODELAY sockopt from kernel space > without going through a fake uaccess. > > Signed-off-by: Christoph Hellwig > --- > fs/dlm/lowcomms.c | 10 ++ > include/net/sctp/sctp.h |

Re: [PATCH 32/33] net: add a new bind_add method

2020-05-20 Thread Marcelo Ricardo Leitner
On Wed, May 20, 2020 at 09:55:08PM +0200, Christoph Hellwig wrote: > The SCTP protocol allows to bind multiple address to a socket. That > feature is currently only exposed as a socket option. Add a bind_add > method struct proto that allows to bind additional addresses, and > switch the dlm code

Re: [PATCH] sctp: check assoc before SCTP_ADDR_{MADE_PRIM,ADDED} event

2020-05-19 Thread Marcelo Ricardo Leitner
On Fri, May 15, 2020 at 10:30:29AM +0200, Jonas Falkevik wrote: > On Wed, May 13, 2020 at 11:32 PM Marcelo Ricardo Leitner > wrote: > > > > On Wed, May 13, 2020 at 10:11:05PM +0200, Jonas Falkevik wrote: > > > On Wed, May 13, 2020 at 6:01 PM Marcelo R

Re: [PATCH] sctp: check assoc before SCTP_ADDR_{MADE_PRIM,ADDED} event

2020-05-13 Thread Marcelo Ricardo Leitner
On Wed, May 13, 2020 at 10:11:05PM +0200, Jonas Falkevik wrote: > On Wed, May 13, 2020 at 6:01 PM Marcelo Ricardo Leitner > wrote: > > > > On Wed, May 13, 2020 at 04:52:16PM +0200, Jonas Falkevik wrote: > > > Do not generate SCTP_ADDR_{MADE_PRIM,ADDED} events for SCTP

Re: [PATCH 32/33] sctp: add sctp_sock_get_primary_addr

2020-05-13 Thread Marcelo Ricardo Leitner
On Wed, May 13, 2020 at 08:26:47AM +0200, Christoph Hellwig wrote: > Add a helper to directly get the SCTP_PRIMARY_ADDR sockopt from kernel > space without going through a fake uaccess. Same comment as on the other dlm/sctp patch. > > Signed-off-by: Christoph Hellwig > --- > fs/dlm/lowcomms.c

Re: [PATCH 27/33] sctp: export sctp_setsockopt_bindx

2020-05-13 Thread Marcelo Ricardo Leitner
On Wed, May 13, 2020 at 08:26:42AM +0200, Christoph Hellwig wrote: > And call it directly from dlm instead of going through kernel_setsockopt. The advantage on using kernel_setsockopt here is that sctp module will only be loaded if dlm actually creates a SCTP socket. With this change, sctp will b

Re: [PATCH] sctp: check assoc before SCTP_ADDR_{MADE_PRIM,ADDED} event

2020-05-13 Thread Marcelo Ricardo Leitner
On Wed, May 13, 2020 at 04:52:16PM +0200, Jonas Falkevik wrote: > Do not generate SCTP_ADDR_{MADE_PRIM,ADDED} events for SCTP_FUTURE_ASSOC > assocs. How did you get them? I'm thinking you're fixing a side-effect of another issue here. For example, in sctp_assoc_update(), it first calls sctp_asso

Re: WARNING in cgroup_finalize_control

2020-05-11 Thread Marcelo Ricardo Leitner
91e86e81) > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10d3c58810 > > The bug was bisected to: > > commit eab59075d3cd7f3535aa2dbbc19a198dfee58892 > Author: Marcelo Ricardo Leitner > Date: Wed Dec 28 11:26:31 2016 + > > sctp: reduce indent l

Re: [PATCH] sctp: Replace zero-length array with flexible-array

2020-05-07 Thread Marcelo Ricardo Leitner
und with the help of Coccinelle. > > [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > [2] https://github.com/KSPP/linux/issues/21 > [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") > > Signed-off-by: Gustavo A. R. Silva Acked-by: Marcelo Ricardo Leitner

Re: [PATCH 27/37] docs: networking: convert sctp.txt to ReST

2020-04-30 Thread Marcelo Ricardo Leitner
On Thu, Apr 30, 2020 at 06:04:22PM +0200, Mauro Carvalho Chehab wrote: > - add SPDX header; > - add a document title; > - adjust identation, whitespaces and blank lines where needed; > - add to networking/index.rst. > > Signed-off-by: Mauro Carvalho Chehab Acked-by: Marce

Re: [PATCH] lib/generic-radix-tree.c: add kmemleak annotations

2019-10-04 Thread Marcelo Ricardo Leitner
sctp_stream::out, and the > generic radix tree uses raw pages which aren't tracked by kmemleak. > > Fix this by adding the kmemleak hooks to the generic radix tree code. Nice, thanks Eric. Reviewed-by: Marcelo Ricardo Leitner > > Reported-by: syzbot+7f3b6b106be8dcdcd...@syzk

Re: [PATCH v2 net 1/3] sctp: change return type of sctp_get_port_local

2019-09-12 Thread Marcelo Ricardo Leitner
ng to int for > sctp_get_port_local. > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") This Fixes tag is not needed. It's just a cleanup. Maybe Dave can remove it for us. Acked-by: Marcelo Ricardo Leitner Thanks. > Signed-off-by: Mao Wenan > --- > net/sctp/socket.c

Re: [PATCH v2 net 3/3] sctp: destroy bucket if failed to bind addr

2019-09-12 Thread Marcelo Ricardo Leitner
_hwframe+0x49/0xbe > > This is because in sctp_do_bind, if sctp_get_port_local is to > create hash bucket successfully, and sctp_add_bind_addr failed > to bind address, e.g return -ENOMEM, so memory leak found, it > needs to destroy allocated bucket. > > Reported-by: Hulk Robot > Signed-off-by: Mao Wenan > Acked-by: Neil Horman Acked-by: Marcelo Ricardo Leitner

Re: [PATCH v2 net 2/3] sctp: remove redundant assignment when call sctp_get_port_local

2019-09-12 Thread Marcelo Ricardo Leitner
On Thu, Sep 12, 2019 at 12:02:18PM +0800, Mao Wenan wrote: > There are more parentheses in if clause when call sctp_get_port_local > in sctp_do_bind, and redundant assignment to 'ret'. This patch is to > do cleanup. > > Signed-off-by: Mao Wenan > Acked-by: Neil Horman

Re: [PATCH] sctp: Fix the link time qualifier of 'sctp_ctrlsock_exit()'

2019-09-11 Thread Marcelo Ricardo Leitner
gt; Signed-off-by: Christophe JAILLET Acked-by: Marcelo Ricardo Leitner

Re: [PATCH net 1/2] sctp: remove redundant assignment when call sctp_get_port_local

2019-09-11 Thread Marcelo Ricardo Leitner
On Wed, Sep 11, 2019 at 11:30:08AM -0300, Marcelo Ricardo Leitner wrote: > On Wed, Sep 11, 2019 at 11:30:38AM +0300, Dan Carpenter wrote: > > On Wed, Sep 11, 2019 at 09:30:47AM +0800, maowenan wrote: > > > > > > > > > On 2019/9/11 3:22, Dan Carpenter wrote: &

Re: [PATCH net 1/2] sctp: remove redundant assignment when call sctp_get_port_local

2019-09-11 Thread Marcelo Ricardo Leitner
On Wed, Sep 11, 2019 at 11:30:38AM +0300, Dan Carpenter wrote: > On Wed, Sep 11, 2019 at 09:30:47AM +0800, maowenan wrote: > > > > > > On 2019/9/11 3:22, Dan Carpenter wrote: > > > On Tue, Sep 10, 2019 at 09:57:10PM +0300, Dan Carpenter wrote: > > >> On Tue, Sep 10, 2019 at 03:13:42PM +0800, Mao

Re: [BACKPORT 4.14.y 4/8] net: sctp: fix warning "NULL check before some freeing functions is not needed"

2019-09-03 Thread Marcelo Ricardo Leitner
On Tue, Sep 03, 2019 at 02:58:16PM +0800, Baolin Wang wrote: > From: Hariprasad Kelam > > This patch removes NULL checks before calling kfree. > > fixes below issues reported by coccicheck > net/sctp/sm_make_chunk.c:2586:3-8: WARNING: NULL check before some > freeing functions is not needed. > n

Re: memory leak in internal_dev_create

2019-08-08 Thread Marcelo Ricardo Leitner
On Wed, Aug 07, 2019 at 01:32:40PM -0700, Pravin Shelar wrote: > On Tue, Aug 6, 2019 at 5:00 AM Hillf Danton wrote: > > > > > > On Tue, 06 Aug 2019 01:58:05 -0700 > > > Hello, > > > > > > syzbot found the following crash on: > > > > > ... > > > BUG: memory leak > > > unreferenced object 0x888

Re: [PATCH v2] net/socket: fix GCC8+ Wpacked-not-aligned warnings

2019-07-30 Thread Marcelo Ricardo Leitner
On Tue, Jul 30, 2019 at 10:38:08AM -0400, Qian Cai wrote: > In file included from ./include/linux/sctp.h:42, > from net/core/skbuff.c:47: > ./include/uapi/linux/sctp.h:395:1: warning: alignment 4 of 'struct > sctp_paddr_change' is less than 8 [-Wpacked-not-aligned] > } __attribute

Re: [PATCH] net: sctp: drop unneeded likely() call around IS_ERR()

2019-07-29 Thread Marcelo Ricardo Leitner
On Mon, Jul 29, 2019 at 08:55:21PM +0200, Enrico Weigelt, metux IT consult wrote: > From: Enrico Weigelt > > IS_ERR() already calls unlikely(), so this extra unlikely() call > around IS_ERR() is not needed. > > Signed-off-by: Enrico Weigelt Acked-by: Marcelo Ricardo Leit

Re: [PATCH] net/sctp: fix GCC8+ -Wpacked-not-aligned warnings

2019-07-28 Thread Marcelo Ricardo Leitner
On Sun, Jul 28, 2019 at 01:05:25PM -0400, Qian Cai wrote: > > > > On Jul 26, 2019, at 5:30 PM, Marcelo Ricardo Leitner > > wrote: > > > > On Fri, Jul 26, 2019 at 04:57:39PM -0400, Qian Cai wrote: > >> There are a lot of those warnings with GCC8+

Re: [PATCH] net/sctp: fix GCC8+ -Wpacked-not-aligned warnings

2019-07-26 Thread Marcelo Ricardo Leitner
On Fri, Jul 26, 2019 at 04:57:39PM -0400, Qian Cai wrote: > There are a lot of those warnings with GCC8+ 64bit, > > In file included from ./include/linux/sctp.h:42, > from net/core/skbuff.c:47: > ./include/uapi/linux/sctp.h:395:1: warning: alignment 4 of 'struct > sctp_paddr_chang

Re: [PATCH] net: sctp: fix memory leak in sctp_send_reset_streams

2019-07-24 Thread Marcelo Ricardo Leitner
_64+0x76/0x1a0 > > > > arch/x86/entry/common.c:301 > > > > [<0000e540958c>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 > > > > > > > > > > > > It was introduced in commit d570a59c5b5f ("sctp: only allow the out > > >

Re: [PATCH] net: sctp: fix warning "NULL check before some freeing functions is not needed"

2019-07-15 Thread Marcelo Ricardo Leitner
ctions is not needed. > > Signed-off-by: Hariprasad Kelam Acked-by: Marcelo Ricardo Leitner > --- > net/sctp/sm_make_chunk.c | 12 > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c > index

Re: general protection fault in sctp_sched_prio_sched

2019-06-18 Thread Marcelo Ricardo Leitner
On Tue, Jun 18, 2019 at 10:45:54PM +0800, Hillf Danton wrote: ... > > Anyway, with the patch above, after calling > > sctp_stream_init_ext() ->ext will be either completely valid, or it > > will not be present at all as it is seting ->ext to NULL if sid > > initialization ended up failing. > > > C

Re: general protection fault in sctp_sched_prio_sched

2019-06-18 Thread Marcelo Ricardo Leitner
Hi, On Tue, Jun 18, 2019 at 04:04:01PM +0800, Hillf Danton wrote: > > Hello Marcelo > > On Mon, 17 Jun 2019 22:43:38 +0800 Marcelo Ricardo Leitner wrote: > > On Mon, Jun 17, 2019 at 10:49:13AM -0300, Marcelo Ricardo Leitner wrote: > > > Hi, > > > > >

Re: general protection fault in sctp_sched_prio_sched

2019-06-17 Thread Marcelo Ricardo Leitner
On Mon, Jun 17, 2019 at 10:49:13AM -0300, Marcelo Ricardo Leitner wrote: > Hi, > > On Sun, Jun 16, 2019 at 11:38:03PM +0800, Hillf Danton wrote: > > > > Hello Syzbot > > > > On Sat, 15 Jun 2019 16:36:06 -0700 (PDT) syzbot wrote: > > > Hello, > &

Re: general protection fault in sctp_sched_prio_sched

2019-06-17 Thread Marcelo Ricardo Leitner
Hi, On Sun, Jun 16, 2019 at 11:38:03PM +0800, Hillf Danton wrote: > > Hello Syzbot > > On Sat, 15 Jun 2019 16:36:06 -0700 (PDT) syzbot wrote: > > Hello, > > > > syzbot found the following crash on: > > ... > Check prio_head and bail out if it is not valid. > > Thanks > Hillf > ->8--- > --

Re: [PATCH] sctp: Add rcu lock to protect dst entry in sctp_transport_route

2019-06-13 Thread Marcelo Ricardo Leitner
On Thu, Jun 13, 2019 at 07:35:44AM -0400, Neil Horman wrote: > On Thu, Jun 13, 2019 at 10:37:51AM +0800, Su Yanjun wrote: > > > > 在 2019/6/12 21:13, Neil Horman 写道: > > > On Tue, Jun 11, 2019 at 10:33:17AM +0800, Su Yanjun wrote: > > > > 在 2019/6/10 19:12, Neil Horman 写道: > > > > > On Mon, Jun 10,

Re: [PATCH] net: sctp: drop unneeded likely() call around IS_ERR()

2019-06-05 Thread Marcelo Ricardo Leitner
On Wed, Jun 05, 2019 at 11:03:27PM +0200, Enrico Weigelt, metux IT consult wrote: > From: Enrico Weigelt > > IS_ERR() already calls unlikely(), so this extra unlikely() call > around IS_ERR() is not needed. > > Signed-off-by: Enrico Weigelt Hi, This patch overlaps with Jun 05 Kefeng Wang

Re: memory leak in sctp_send_reset_streams

2019-06-01 Thread Marcelo Ricardo Leitner
On Sat, Jun 01, 2019 at 08:26:15PM +0800, Hillf Danton wrote: > > Hi Hi, > > On Fri, May 31, 2019 at 02:18:06PM -0700, syzbot wrote: > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:036e3431 Merge git://git.kernel.org/pub/scm/linux/kernel/g.. > > git tree:

Re: memory leak in sctp_send_reset_streams

2019-05-31 Thread Marcelo Ricardo Leitner
On Fri, May 31, 2019 at 02:18:06PM -0700, syzbot wrote: > Hello, > > syzbot found the following crash on: syzbot++

Re: memory leak in sctp_process_init

2019-05-31 Thread Marcelo Ricardo Leitner
On Thu, May 30, 2019 at 03:56:34PM -0400, Neil Horman wrote: > On Thu, May 30, 2019 at 12:17:05PM -0300, Marcelo Ricardo Leitner wrote: ... > > --- a/net/sctp/sm_sideeffect.c > > +++ b/net/sctp/sm_sideeffect.c > > @@ -898,6 +898,11 @@ static void sctp_cmd_new_state(struct sc

Re: memory leak in sctp_process_init

2019-05-30 Thread Marcelo Ricardo Leitner
On Thu, May 30, 2019 at 10:20:11AM -0400, Neil Horman wrote: > On Wed, May 29, 2019 at 08:37:57PM -0300, Marcelo Ricardo Leitner wrote: > > On Wed, May 29, 2019 at 03:07:09PM -0400, Neil Horman wrote: > > > --- a/net/sctp/sm_make_chunk.c > > > +++ b/net/sctp/sm_ma

Re: memory leak in sctp_process_init

2019-05-29 Thread Marcelo Ricardo Leitner
On Wed, May 29, 2019 at 03:07:09PM -0400, Neil Horman wrote: > --- a/net/sctp/sm_make_chunk.c > +++ b/net/sctp/sm_make_chunk.c > @@ -2419,9 +2419,12 @@ int sctp_process_init(struct sctp_association *asoc, > struct sctp_chunk *chunk, > /* Copy cookie in case we need to resend COOKIE-ECHO. */

Re: [PATCH net-next] sctp: deduplicate identical skb_checksum_ops

2019-05-29 Thread Marcelo Ricardo Leitner
tp_dnat_handler 13211132-189 > l4proto_manip_pkt 25362313-223 > Total: Before=359297613, After=359296459, chg -0.00% > > Reviewed-by: Xin Long > Signed-off-by: Matteo Croce Acked-by: Marcelo Ricardo Leitner

Re: memory leak in sctp_process_init

2019-05-27 Thread Marcelo Ricardo Leitner
On Mon, May 27, 2019 at 05:48:06PM -0700, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:9c7db500 Merge tag 'selinux-pr-20190521' of git://git.kern.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=10388530a0 > kernel

Re: general protection fault in sctp_sched_rr_dequeue

2019-03-07 Thread Marcelo Ricardo Leitner
On Wed, Mar 06, 2019 at 07:03:10AM -0500, Neil Horman wrote: > On Wed, Mar 06, 2019 at 06:43:48PM +0800, Xin Long wrote: > > On Wed, Mar 6, 2019 at 9:42 AM syzbot > > wrote: > > > > > > Hello, > > > > > > syzbot found the following crash on: > > > > > > HEAD commit:63bdf4284c38 Merge branch 'l

Re: [PATCH] sctp: chunk.c: correct format string for size_t in printk

2019-02-28 Thread Marcelo Ricardo Leitner
ntk_ratelimited' > printk(fmt, ##__VA_ARGS__); \ >~~~^ > > Fixes: 5b5e0928f742 ("lib/vsprintf.c: remove %Z support") > Link: https://github.com/ClangBuiltLinux/linux/issues/378 > Signed-off-by: Matthias Maennich Acked-by: Marcelo Ric

Re: KASAN: use-after-free Read in sctp_outq_tail

2019-02-14 Thread Marcelo Ricardo Leitner
On Thu, Feb 14, 2019 at 10:52:00PM +0800, Xin Long wrote: > On Thu, Feb 14, 2019 at 10:39 PM Marcelo Ricardo Leitner > wrote: > > > > On Thu, Feb 14, 2019 at 12:17:45PM -0200, Marcelo Ricardo Leitner wrote: > > > On Thu, Feb 14, 2019 at 10:03:30PM +0800, Xin Long wr

Re: KASAN: use-after-free Read in sctp_outq_tail

2019-02-14 Thread Marcelo Ricardo Leitner
On Thu, Feb 14, 2019 at 12:17:45PM -0200, Marcelo Ricardo Leitner wrote: > On Thu, Feb 14, 2019 at 10:03:30PM +0800, Xin Long wrote: > > On Wed, Feb 13, 2019 at 9:52 PM Marcelo Ricardo Leitner > > wrote: > > > > > > On Wed, Feb 13, 2019 at 12:35:56PM +0800, Xin L

Re: KASAN: use-after-free Read in sctp_outq_tail

2019-02-14 Thread Marcelo Ricardo Leitner
On Thu, Feb 14, 2019 at 12:17:45PM -0200, Marcelo Ricardo Leitner wrote: > On Thu, Feb 14, 2019 at 10:03:30PM +0800, Xin Long wrote: > > On Wed, Feb 13, 2019 at 9:52 PM Marcelo Ricardo Leitner > > wrote: > > > > > > On Wed, Feb 13, 2019 at 12:35:56PM +0800, Xin L

Re: KASAN: use-after-free Read in sctp_outq_tail

2019-02-14 Thread Marcelo Ricardo Leitner
On Thu, Feb 14, 2019 at 10:03:30PM +0800, Xin Long wrote: > On Wed, Feb 13, 2019 at 9:52 PM Marcelo Ricardo Leitner > wrote: > > > > On Wed, Feb 13, 2019 at 12:35:56PM +0800, Xin Long wrote: > > > On Wed, Feb 13, 2019 at 4:00 AM syzbot > > > wrote: > >

Re: [PATCH net] sctp: make sctp_setsockopt_events() less strict about the option length

2019-02-13 Thread &#x27;Marcelo Ricardo Leitner'
On Wed, Feb 13, 2019 at 04:17:41PM +, David Laight wrote: > From: Marcelo Ricardo Leitner > > Sent: 10 February 2019 20:16 > ... > > We have issues on read path too. 52ccb8e90c0a ("[SCTP]: Update > > SCTP_PEER_ADDR_PARAMS socket option to the latest api

Re: KASAN: use-after-free Read in sctp_outq_tail

2019-02-13 Thread Marcelo Ricardo Leitner
On Wed, Feb 13, 2019 at 12:35:56PM +0800, Xin Long wrote: > On Wed, Feb 13, 2019 at 4:00 AM syzbot > wrote: > > > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:d4104460aec1 Add linux-next specific files for 20190211 > > git tree: linux-next > > console output:

Re: KASAN: use-after-free Read in sctp_outq_tail

2019-02-12 Thread Marcelo Ricardo Leitner
On Tue, Feb 12, 2019 at 11:04:27AM -0800, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:d4104460aec1 Add linux-next specific files for 20190211 > git tree: linux-next I can't find this commit. How can I know for sure which commits are in? Recent patche

Re: [PATCH net] sctp: call gso_reset_checksum when computing checksum in sctp_gso_segment

2019-02-12 Thread Marcelo Ricardo Leitner
not to be set in skb_segment(). > > For TCP/UDP, when feature supports HW_CSUM, CHECKSUM_PARTIAL will be set > and gso_reset_checksum will be called to set SKB_GSO_CB(skb)->csum_start. > > So SCTP should do the same as TCP/UDP, to call gso_reset_checksum() when > computing checks

Re: [PATCH net] sctp: set stream ext to NULL after freeing it in sctp_stream_outq_migrate

2019-02-12 Thread Marcelo Ricardo Leitner
d. > > We fix it by simply setting them to NULL after freeing. > > Fixes: 5e32a431 ("sctp: introduce stream scheduler foundations") > Reported-by: syzbot+58e480e7b28f2d890...@syzkaller.appspotmail.com > Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner

Re: [PATCH net] sctp: make sctp_setsockopt_events() less strict about the option length

2019-02-11 Thread Marcelo Ricardo Leitner
On Mon, Feb 11, 2019 at 10:04:32AM -0500, Neil Horman wrote: > On Sun, Feb 10, 2019 at 10:46:16AM -0200, Marcelo Ricardo Leitner wrote: > > On Sat, Feb 09, 2019 at 03:12:17PM -0800, David Miller wrote: > > > From: Marcelo Ricardo Leitner > > > Date: Wed

Re: [PATCH net] sctp: make sctp_setsockopt_events() less strict about the option length

2019-02-10 Thread Marcelo Ricardo Leitner
On Sun, Feb 10, 2019 at 10:46:16AM -0200, Marcelo Ricardo Leitner wrote: > On Sat, Feb 09, 2019 at 03:12:17PM -0800, David Miller wrote: > > From: Marcelo Ricardo Leitner > > Date: Wed, 6 Feb 2019 18:37:54 -0200 > > > > > On Wed, Feb 06, 2019 at 12:14:30PM -0800, J

Re: [PATCH net] sctp: make sctp_setsockopt_events() less strict about the option length

2019-02-10 Thread Marcelo Ricardo Leitner
On Sat, Feb 09, 2019 at 03:12:17PM -0800, David Miller wrote: > From: Marcelo Ricardo Leitner > Date: Wed, 6 Feb 2019 18:37:54 -0200 > > > On Wed, Feb 06, 2019 at 12:14:30PM -0800, Julien Gomes wrote: > >> Make sctp_setsockopt_events() able to accept sctp_event_subscrib

Re: [PATCH net] sctp: make sctp_setsockopt_events() less strict about the option length

2019-02-07 Thread &#x27;Marcelo Ricardo Leitner'
On Thu, Feb 07, 2019 at 05:33:07PM +, David Laight wrote: > From: Marcelo Ricardo Leitner > > Sent: 06 February 2019 21:07 > > > > On Wed, Feb 06, 2019 at 12:48:38PM -0800, Julien Gomes wrote: > > > > > > > > > On 2/6/19 12:37 PM, Marcelo Ricard

Re: [PATCH net] sctp: make sctp_setsockopt_events() less strict about the option length

2019-02-06 Thread Marcelo Ricardo Leitner
On Wed, Feb 06, 2019 at 04:08:27PM -0500, Neil Horman wrote: > On Wed, Feb 06, 2019 at 12:48:38PM -0800, Julien Gomes wrote: > > > > > > On 2/6/19 12:37 PM, Marcelo Ricardo Leitner wrote: > > > On Wed, Feb 06, 2019 at 12:14:30PM -0800, Julien Gomes wrote: >

Re: [PATCH net] sctp: make sctp_setsockopt_events() less strict about the option length

2019-02-06 Thread Marcelo Ricardo Leitner
On Wed, Feb 06, 2019 at 12:48:38PM -0800, Julien Gomes wrote: > > > On 2/6/19 12:37 PM, Marcelo Ricardo Leitner wrote: > > On Wed, Feb 06, 2019 at 12:14:30PM -0800, Julien Gomes wrote: > >> Make sctp_setsockopt_events() able to accept sctp_event_subscribe > >> s

Re: [PATCH net] sctp: make sctp_setsockopt_events() less strict about the option length

2019-02-06 Thread Marcelo Ricardo Leitner
On Wed, Feb 06, 2019 at 12:14:30PM -0800, Julien Gomes wrote: > Make sctp_setsockopt_events() able to accept sctp_event_subscribe > structures longer than the current definitions. > > This should prevent unjustified setsockopt() failures due to struct > sctp_event_subscribe extensions (as in 4.11

Re: [PATCH AUTOSEL 4.19 033/258] sctp: Fix SKB list traversal in sctp_intl_store_ordered().

2019-01-28 Thread Marcelo Ricardo Leitner
On Mon, Jan 28, 2019 at 10:55:39AM -0500, Sasha Levin wrote: > From: "David S. Miller" > > [ Upstream commit e15e067d0656625c77c52b4e5f0cfbf0c0c3583f ] > > Same change as made to sctp_intl_store_reasm(). > > To be fully correct, an iterator has an undefined value when something > like skb_queue

Re: [PATCH AUTOSEL 4.19 034/258] sctp: Fix SKB list traversal in sctp_intl_store_reasm().

2019-01-28 Thread Marcelo Ricardo Leitner
On Mon, Jan 28, 2019 at 10:55:40AM -0500, Sasha Levin wrote: > From: "David S. Miller" > > [ Upstream commit 348bbc25c40844c5efa083a3842c7f53d70a815e ] > > To be fully correct, an iterator has an undefined value when something > like skb_queue_walk() naturally terminates. > > This will actually

Re: [PATCH 6/7] sctp: Convert to genradix

2019-01-18 Thread Marcelo Ricardo Leitner
On Fri, Jan 18, 2019 at 08:10:22AM -0500, Neil Horman wrote: > On Tue, Jan 15, 2019 at 12:29:26PM -0200, Marcelo Ricardo Leitner wrote: > > On Mon, Dec 17, 2018 at 04:00:21PM -0500, Kent Overstreet wrote: > > > On Mon, Dec 17, 2018 at 12:50:01PM -0800, Andrew Morton wrote: >

Re: [PATCH 6/7] sctp: Convert to genradix

2019-01-15 Thread Marcelo Ricardo Leitner
On Mon, Dec 17, 2018 at 04:00:21PM -0500, Kent Overstreet wrote: > On Mon, Dec 17, 2018 at 12:50:01PM -0800, Andrew Morton wrote: > > On Mon, 17 Dec 2018 08:19:28 -0500 Kent Overstreet > > wrote: > > > > > @@ -535,9 +470,6 @@ int sctp_send_add_streams(struct sctp_association > > > *asoc, > > >

Re: [PATCH net] sctp: allocate sctp_sockaddr_entry with kzalloc

2019-01-14 Thread Marcelo Ricardo Leitner
er.appspotmail.com Acked-by: Marcelo Ricardo Leitner > --- > net/sctp/ipv6.c | 5 + > net/sctp/protocol.c | 4 +--- > 2 files changed, 2 insertions(+), 7 deletions(-) > > diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c > index b9ed271..ed8e006 100644 > --- a/net/sc

Re: [PATCH 6/7] sctp: Convert to genradix

2018-12-17 Thread Marcelo Ricardo Leitner
On Mon, Dec 17, 2018 at 12:50:01PM -0800, Andrew Morton wrote: > On Mon, 17 Dec 2018 08:19:28 -0500 Kent Overstreet > wrote: > > > @@ -535,9 +470,6 @@ int sctp_send_add_streams(struct sctp_association *asoc, > > goto out; > > } > > > > - stream->incnt = incnt; > > - stream-

Re: [PATCH net] sctp: initialize sin6_flowinfo for ipv6 addrs in sctp_inet6addr_event

2018-12-10 Thread Marcelo Ricardo Leitner
really used by SCTP, so it will be fixed by simply > setting it to 0. > > The issue exists since very beginning. > Thanks Alexander for the reproducer provided. > > Reported-by: syzbot+ad5d327e6936a2e28...@syzkaller.appspotmail.com > Signed-off-by: Xin Long Acked-by: Marcelo

Re: general protection fault in sctp_sched_dequeue_common

2018-11-21 Thread Marcelo Ricardo Leitner
On Thu, Nov 22, 2018 at 02:51:44AM +0900, Xin Long wrote: > On Wed, Nov 21, 2018 at 1:30 PM syzbot > wrote: > > > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:cfc6731d2f79 Merge branch 'sctp-add-subscribe-per-asoc-and.. > > git tree: net-next > > console outp

Re: KASAN: use-after-free Read in sctp_id2assoc

2018-10-16 Thread Marcelo Ricardo Leitner
On Tue, Oct 16, 2018 at 07:28:17AM -0400, Neil Horman wrote: > On Wed, Oct 10, 2018 at 03:40:11PM -0300, Marcelo Ricardo Leitner wrote: > > On Wed, Oct 10, 2018 at 08:28:22PM +0200, Dmitry Vyukov wrote: > > > On Wed, Oct 10, 2018 at 8:13 PM, Marcelo Ricardo Leitner > >

Re: [PATCH 4.17 52/63] sctp: introduce sctp_dst_mtu

2018-07-25 Thread Marcelo Ricardo Leitner
On Mon, Jul 23, 2018 at 02:24:58PM +0200, Greg Kroah-Hartman wrote: > 4.17-stable review patch. If anyone has any objections, please let me know. Both SCTP patches LGTM. Thanks.

Re: [PATCH 4.4 19/92] sctp: delay the authentication for the duplicated cookie-echo chunk

2018-06-07 Thread Marcelo Ricardo Leitner
On Wed, Jun 06, 2018 at 11:31:47PM +0100, Ben Hutchings wrote: > On Thu, 2018-05-24 at 11:37 +0200, Greg Kroah-Hartman wrote: > > 4.4-stable review patch.  If anyone has any objections, please let me know. > > > > -- > > > > From: Xin Long > > > > [ Upstream commit 59d8d4434f429

  1   2   3   >