Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756841Ab0LBCrN (ORCPT ); Wed, 1 Dec 2010 21:47:13 -0500 Received: from mail-qy0-f174.google.com ([209.85.216.174]:33700 "EHLO mail-qy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756480Ab0LBCrL convert rfc822-to-8bit (ORCPT ); Wed, 1 Dec 2010 21:47:11 -0500 Subject: Re: [PATCH] media: rc: ir-lirc-codec: fix potential integer overflow Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Jarod Wilson In-Reply-To: <1290791197-21403-1-git-send-email-segoon@openwall.com> Date: Wed, 1 Dec 2010 21:47:08 -0500 Cc: kernel-janitors@vger.kernel.org, Mauro Carvalho Chehab , =?iso-8859-1?Q?David_H=E4rdeman?= , Jarod Wilson , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <7965B2E6-E741-4FDB-84C4-8F5FD3A130A6@wilsonet.com> References: <1290791197-21403-1-git-send-email-segoon@openwall.com> To: Vasiliy Kulikov X-Mailer: Apple Mail (2.1082) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 769 Lines: 26 On Nov 26, 2010, at 12:06 PM, Vasiliy Kulikov wrote: > 'n' may be bigger than MAX_INT*sizeof(int), if so checking of truncated > (int)(n/sizeof(int)) for LIRCBUF_SIZE overflow and then using nontruncated 'count' > doesn't make sense. Also n may be up to sizeof(int)-1 bytes bigger than expected, > so check value of (n % sizeof(int)) too. > > Signed-off-by: Vasiliy Kulikov > --- > Compile tested only. Looks sane. Acked-by: Jarod Wilson -- Jarod Wilson jarod@wilsonet.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/