Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752121AbdL0PiB (ORCPT ); Wed, 27 Dec 2017 10:38:01 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:37888 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751043AbdL0Ph7 (ORCPT ); Wed, 27 Dec 2017 10:37:59 -0500 Date: Wed, 27 Dec 2017 10:37:54 -0500 (EST) Message-Id: <20171227.103754.1156659391056933085.davem@davemloft.net> To: avinash.repaka@oracle.com Cc: santosh.shilimkar@oracle.com, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] RDS: Check cmsg_len before dereferencing CMSG_DATA From: David Miller In-Reply-To: <1513916224-9445-1-git-send-email-avinash.repaka@oracle.com> References: <1513916224-9445-1-git-send-email-avinash.repaka@oracle.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 27 Dec 2017 07:37:59 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 567 Lines: 14 From: Avinash Repaka Date: Thu, 21 Dec 2017 20:17:04 -0800 > RDS currently doesn't check if the length of the control message is > large enough to hold the required data, before dereferencing the control > message data. This results in following crash: ... > To fix this, we verify that the cmsg_len is large enough to hold the > data to be read, before proceeding further. > > Reported-by: syzbot > Signed-off-by: Avinash Repaka Applied and queued up for -stable, thanks.