Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dhowells@redhat.com
Cc: netdev@vger.kernel.org, jaltman@auristor.com,
	linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] rxrpc: Fix local refcounting
Date: Sun, 11 Aug 2019 21:29:28 -0700 (PDT)	[thread overview]
Message-ID: <20190811.212928.1681769879219779999.davem@davemloft.net> (raw)
In-Reply-To: <156538726702.16201.13552536596121161945.stgit@warthog.procyon.org.uk>

From: David Howells <dhowells@redhat.com>
Date: Fri, 09 Aug 2019 22:47:47 +0100

> Fix rxrpc_unuse_local() to handle a NULL local pointer as it can be called
> on an unbound socket on which rx->local is not yet set.
> 
> The following reproduced (includes omitted):
> 
> 	int main(void)
> 	{
> 		socket(AF_RXRPC, SOCK_DGRAM, AF_INET);
> 		return 0;
> 	}
> 
> causes the following oops to occur:
> 
> 	BUG: kernel NULL pointer dereference, address: 0000000000000010
> 	...
> 	RIP: 0010:rxrpc_unuse_local+0x8/0x1b
> 	...
> 	Call Trace:
> 	 rxrpc_release+0x2b5/0x338
> 	 __sock_release+0x37/0xa1
> 	 sock_close+0x14/0x17
> 	 __fput+0x115/0x1e9
> 	 task_work_run+0x72/0x98
> 	 do_exit+0x51b/0xa7a
> 	 ? __context_tracking_exit+0x4e/0x10e
> 	 do_group_exit+0xab/0xab
> 	 __x64_sys_exit_group+0x14/0x17
> 	 do_syscall_64+0x89/0x1d4
> 	 entry_SYSCALL_64_after_hwframe+0x49/0xbe
> 
> Reported-by: syzbot+20dee719a2e090427b5f@syzkaller.appspotmail.com
> Fixes: 730c5fd42c1e ("rxrpc: Fix local endpoint refcounting")
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Jeffrey Altman <jaltman@auristor.com>

Applied.

      parent reply	other threads:[~2019-08-12  4:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-09 21:47 [PATCH net] rxrpc: Fix local refcounting David Howells
2019-08-09 22:34 ` Jeffrey E Altman
2019-08-12  4:29 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190811.212928.1681769879219779999.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=jaltman@auristor.com \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox