From patchwork Mon Feb 3 10:30:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 1232677 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=PuMM8F7P; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 48B3y91L4Tz9sPK for ; Mon, 3 Feb 2020 21:30:56 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727606AbgBCKaz (ORCPT ); Mon, 3 Feb 2020 05:30:55 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:23282 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726100AbgBCKaz (ORCPT ); Mon, 3 Feb 2020 05:30:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580725854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SnRCq3AS1z4sFuxBCb6ZulsCTqiIP0mZ/GCJGWgKAJU=; b=PuMM8F7PnQxgdNyi/v5+tmZrpwFb5DgdidljA+WkpsgvmpGQFtT9KE7uxJUQ8KpiT9X8Tk 2u6FC5qCkPizCL1bgHYowK9oHc/juvJFcw9jFZWiHfX+858nCCmSb9eRA7z6QDb1zVRVhV aCjBxAQ3y9eOiY1Zn8h27AS4AFJhBE4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-376-4EqTogPSNMS0-fukX4_jeg-1; Mon, 03 Feb 2020 05:30:47 -0500 X-MC-Unique: 4EqTogPSNMS0-fukX4_jeg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A8E8C107ACC4; Mon, 3 Feb 2020 10:30:46 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-218.rdu2.redhat.com [10.10.120.218]) by smtp.corp.redhat.com (Postfix) with ESMTP id CF9047792E; Mon, 3 Feb 2020 10:30:45 +0000 (UTC) Subject: [PATCH net 0/4] rxrpc: Fixes ver #2 From: David Howells To: netdev@vger.kernel.org Cc: dhowells@redhat.com, linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org Date: Mon, 03 Feb 2020 10:30:45 +0000 Message-ID: <158072584492.743488.4616022353630142921.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Here are a number of fixes for AF_RXRPC: (1) Fix a potential use after free in rxrpc_put_local() where it was accessing the object just put to get tracing information. (2) Fix insufficient notifications being generated by the function that queues data packets on a call. This occasionally causes recvmsg() to stall indefinitely. (3) Fix a number of packet-transmitting work functions to hold an active count on the local endpoint so that the UDP socket doesn't get destroyed whilst they're calling kernel_sendmsg() on it. (4) Fix a NULL pointer deref that stemmed from a call's connection pointer being cleared when the call was disconnected. Changes: v2: Removed a couple of BUG() statements that got added. The patches are tagged here: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-fixes-20200130 and can also be found on the following branch: http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-fixes David --- David Howells (4): rxrpc: Fix use-after-free in rxrpc_put_local() rxrpc: Fix insufficient receive notification generation rxrpc: Fix missing active use pinning of rxrpc_local object rxrpc: Fix NULL pointer deref due to call->conn being cleared on disconnect net/rxrpc/af_rxrpc.c | 2 ++ net/rxrpc/ar-internal.h | 11 +++++++++++ net/rxrpc/call_object.c | 4 ++-- net/rxrpc/conn_client.c | 3 +-- net/rxrpc/conn_event.c | 30 ++++++++++++++++++++---------- net/rxrpc/conn_object.c | 4 ++-- net/rxrpc/input.c | 6 ++---- net/rxrpc/local_object.c | 23 +++++++++++------------ net/rxrpc/output.c | 27 +++++++++------------------ net/rxrpc/peer_event.c | 42 +++++++++++++++++++++++------------------- 10 files changed, 83 insertions(+), 69 deletions(-)