From patchwork Sun Dec 16 07:01:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shamir Rabinovitch X-Patchwork-Id: 10732369 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C057513AD for ; Sun, 16 Dec 2018 07:01:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A830829DE5 for ; Sun, 16 Dec 2018 07:01:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C81F29DEE; Sun, 16 Dec 2018 07:01:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11C0729DE5 for ; Sun, 16 Dec 2018 07:01:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729878AbeLPHBf (ORCPT ); Sun, 16 Dec 2018 02:01:35 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:60424 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729758AbeLPHBe (ORCPT ); Sun, 16 Dec 2018 02:01:34 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wBG6xBuc047515; Sun, 16 Dec 2018 07:01:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2018-07-02; bh=VBlwyUMxiUobarJNtKV1+VypsceKDvQY4FPZnr5ezSc=; b=XxgWDhynV45fbVSsoNhLOlWtTdRunwRC8KrJwB+jN3xBR2CopmaW9Ep4WLIzOgbcpFNF Rmbg6QnM/INyBgfDifyQmvBjPwQd0CoNU8218u8Scex5hHqc+ToQHV84XHXaFRl1yK2G SsXzG7Cj1+6mYCsQZ1WvxDnIppSLBJPuLexMs2Z4uNAj1R52mLDw9bk32p3OEllKncp7 69paKXhXXxPhF8ncuTKQvdkVRNxCL73RyJAI1loshADosfmo49GLYmM66ju+hLaqhOFb ZCStauvTzmwF3goVXtzFZw4Ba8981M4uzuzuv9vVa/K/QHGu6Y6ew5CTNnTxDqTkQw/6 MA== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2pcq4dj6sn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 16 Dec 2018 07:01:32 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id wBG71Ogh013740 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 16 Dec 2018 07:01:24 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wBG71NP1013118; Sun, 16 Dec 2018 07:01:23 GMT Received: from localhost.localdomain (/77.124.81.87) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 15 Dec 2018 23:01:23 -0800 From: Shamir Rabinovitch To: linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, netdev@vger.kernel.org Cc: shamir.rabinovitch@oracle.com, gerd.rausch@oracle.com, santosh.shilimkar@oracle.com, haakon.bugge@oracle.com, davem@davemloft.net Subject: [PATCH rds linux-next v4 0/2] WARNING in rds_message_alloc_sgs Date: Sun, 16 Dec 2018 09:01:07 +0200 Message-Id: <20181216070109.6758-1-shamir.rabinovitch@oracle.com> X-Mailer: git-send-email 2.17.2 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9108 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=635 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812160066 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: shamir rabinovitch This patch set fix google syzbot rds bug found in linux-next. The first patch solve the syzbot issue. The second patch fix issue mentioned by Leon Romanovsky that drivers should not call WARN_ON as result from user input. syzbot bug report can be foud here: https://lkml.org/lkml/2018/10/31/28 v1->v2: - patch 1: make rds_iov_vector fields name more descriptive (Hakon) - patch 1: fix potential mem leak in rds_rm_size if krealloc fail (Hakon) v2->v3: - patch 2: harden rds_sendmsg for invalid number of sgs (Gerd) v3->v4 - Santosh a.b. on both patches + repost to net-dev shamir rabinovitch (2): net/rds: fix warn in rds_message_alloc_sgs net/rds: remove user triggered WARN_ON in rds_sendmsg net/rds/message.c | 24 +++++++++++---- net/rds/rdma.c | 75 +++++++++++++++++++++++------------------------ net/rds/rds.h | 23 +++++++++++---- net/rds/send.c | 59 ++++++++++++++++++++++++++++++------- 4 files changed, 120 insertions(+), 61 deletions(-)