Re: [PATCH net] sctp: set newsk sk_socket before processing listening sk backlog

2019-10-02 Thread Xin Long
On Thu, Oct 3, 2019 at 1:41 AM Marcelo Ricardo Leitner wrote: > > On Thu, Oct 03, 2019 at 01:26:46AM +0800, Xin Long wrote: > > On Wed, Oct 2, 2019 at 8:55 PM Marcelo Ricardo Leitner > > wrote: > > > > > > On Wed, Oct 02, 2019 at 04:23:52PM +0800, Xin Long wrote: > > > > On Wed, Oct 2, 2019 at 9:

Re: [PATCH net] sctp: set newsk sk_socket before processing listening sk backlog

2019-10-02 Thread Marcelo Ricardo Leitner
On Wed, Oct 02, 2019 at 02:41:27PM -0300, Marcelo Ricardo Leitner wrote: > On Thu, Oct 03, 2019 at 01:26:46AM +0800, Xin Long wrote: > > On Wed, Oct 2, 2019 at 8:55 PM Marcelo Ricardo Leitner > > wrote: > > > > > > On Wed, Oct 02, 2019 at 04:23:52PM +0800, Xin Long wrote: > > > > On Wed, Oct 2, 20

Re: [PATCH net] sctp: set newsk sk_socket before processing listening sk backlog

2019-10-02 Thread Marcelo Ricardo Leitner
On Thu, Oct 03, 2019 at 01:26:46AM +0800, Xin Long wrote: > On Wed, Oct 2, 2019 at 8:55 PM Marcelo Ricardo Leitner > wrote: > > > > On Wed, Oct 02, 2019 at 04:23:52PM +0800, Xin Long wrote: > > > On Wed, Oct 2, 2019 at 9:04 AM Marcelo Ricardo Leitner > > > wrote: > > > > > > > > On Mon, Sep 30, 2

Re: [PATCH net] sctp: set newsk sk_socket before processing listening sk backlog

2019-10-02 Thread Xin Long
On Thu, Oct 3, 2019 at 1:26 AM Xin Long wrote: > > On Wed, Oct 2, 2019 at 8:55 PM Marcelo Ricardo Leitner > wrote: > > > > On Wed, Oct 02, 2019 at 04:23:52PM +0800, Xin Long wrote: > > > On Wed, Oct 2, 2019 at 9:04 AM Marcelo Ricardo Leitner > > > wrote: > > > > > > > > On Mon, Sep 30, 2019 at 0

Re: [PATCH net] sctp: set newsk sk_socket before processing listening sk backlog

2019-10-02 Thread Xin Long
On Wed, Oct 2, 2019 at 8:55 PM Marcelo Ricardo Leitner wrote: > > On Wed, Oct 02, 2019 at 04:23:52PM +0800, Xin Long wrote: > > On Wed, Oct 2, 2019 at 9:04 AM Marcelo Ricardo Leitner > > wrote: > > > > > > On Mon, Sep 30, 2019 at 09:10:18PM +0800, Xin Long wrote: > > > > This patch is to fix a NU

Re: [PATCH net] sctp: set newsk sk_socket before processing listening sk backlog

2019-10-02 Thread Marcelo Ricardo Leitner
On Wed, Oct 02, 2019 at 04:23:52PM +0800, Xin Long wrote: > On Wed, Oct 2, 2019 at 9:04 AM Marcelo Ricardo Leitner > wrote: > > > > On Mon, Sep 30, 2019 at 09:10:18PM +0800, Xin Long wrote: > > > This patch is to fix a NULL-ptr deref crash in selinux_sctp_bind_connect: > > > > > > [...] kasan: G

Re: [PATCH net] sctp: set newsk sk_socket before processing listening sk backlog

2019-10-02 Thread Neil Horman
On Wed, Oct 02, 2019 at 04:23:52PM +0800, Xin Long wrote: > On Wed, Oct 2, 2019 at 9:04 AM Marcelo Ricardo Leitner > wrote: > > > > On Mon, Sep 30, 2019 at 09:10:18PM +0800, Xin Long wrote: > > > This patch is to fix a NULL-ptr deref crash in selinux_sctp_bind_connect: > > > > > > [...] kasan: G

Re: [PATCH net] sctp: set newsk sk_socket before processing listening sk backlog

2019-10-02 Thread Xin Long
On Wed, Oct 2, 2019 at 9:04 AM Marcelo Ricardo Leitner wrote: > > On Mon, Sep 30, 2019 at 09:10:18PM +0800, Xin Long wrote: > > This patch is to fix a NULL-ptr deref crash in selinux_sctp_bind_connect: > > > > [...] kasan: GPF could be caused by NULL-ptr deref or user memory access > > [...] R

Re: [PATCH net] sctp: set newsk sk_socket before processing listening sk backlog

2019-10-01 Thread Marcelo Ricardo Leitner
On Mon, Sep 30, 2019 at 09:10:18PM +0800, Xin Long wrote: > This patch is to fix a NULL-ptr deref crash in selinux_sctp_bind_connect: > > [...] kasan: GPF could be caused by NULL-ptr deref or user memory access > [...] RIP: 0010:selinux_sctp_bind_connect+0x16a/0x230 > [...] Call Trace: > [

Re: [PATCH net] sctp: set newsk sk_socket before processing listening sk backlog

2019-10-01 Thread David Miller
From: Xin Long Date: Mon, 30 Sep 2019 21:10:18 +0800 > This patch is to fix a NULL-ptr deref crash in selinux_sctp_bind_connect: ... Marcel and Neil, please review.

[PATCH net] sctp: set newsk sk_socket before processing listening sk backlog

2019-09-30 Thread Xin Long
This patch is to fix a NULL-ptr deref crash in selinux_sctp_bind_connect: [...] kasan: GPF could be caused by NULL-ptr deref or user memory access [...] RIP: 0010:selinux_sctp_bind_connect+0x16a/0x230 [...] Call Trace: [...] security_sctp_bind_connect+0x58/0x90 [...] sctp_process_ascon