From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752836Ab1K2GT5 (ORCPT ); Tue, 29 Nov 2011 01:19:57 -0500 Received: from shards.monkeyblade.net ([198.137.202.13]:34894 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751569Ab1K2GTy (ORCPT ); Tue, 29 Nov 2011 01:19:54 -0500 Date: Tue, 29 Nov 2011 01:19:32 -0500 (EST) Message-Id: <20111129.011932.1501413448765180498.davem@davemloft.net> To: xi.wang@gmail.com Cc: linux-kernel@vger.kernel.org, vladislav.yasevich@hp.com, sri@us.ibm.com, linux-sctp@vger.kernel.org, netdev@vger.kernel.org, security@kernel.org Subject: Re: [PATCH] sctp: integer overflow in sctp_auth_create_key() From: David Miller In-Reply-To: <028246D6-9024-4E43-93A1-25A87878CBBC@gmail.com> References: <028246D6-9024-4E43-93A1-25A87878CBBC@gmail.com> X-Mailer: Mew version 6.4 on Emacs 23.2 / 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.2.6 (shards.monkeyblade.net [198.137.202.13]); Mon, 28 Nov 2011 22:19:35 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xi Wang Date: Tue, 22 Nov 2011 20:55:30 -0500 > The previous commit 30c2235c is incomplete and cannot prevent integer > overflows. For example, when key_len is 0x80000000 (INT_MAX + 1), the > left-hand side of the check, (INT_MAX - key_len), which is unsigned, > becomes 0xffffffff (UINT_MAX) and bypasses the check. > > Signed-off-by: Xi Wang Applied, but I had to apply your patch by hand because it was corrupted by your email client. Please fix this problem because I am not applying any other patch you've submitted which has this issue.