From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934052AbdKGNIL (ORCPT ); Tue, 7 Nov 2017 08:08:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34364 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934026AbdKGNIJ (ORCPT ); Tue, 7 Nov 2017 08:08:09 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9CF447CB87 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=dhowells@redhat.com Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20171106222153.GA37298@gmail.com> References: <20171106222153.GA37298@gmail.com> <94eb2c1886e4e1e95e055d54b9ab@google.com> <15884.1510005945@warthog.procyon.org.uk> To: Eric Biggers Cc: dhowells@redhat.com, syzbot , davem@davemloft.net, herbert@gondor.apana.org.au, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: general protection fault in asn1_ber_decoder MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12840.1510060086.1@warthog.procyon.org.uk> Date: Tue, 07 Nov 2017 13:08:06 +0000 Message-ID: <12841.1510060086@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 07 Nov 2017 13:08:09 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Eric Biggers wrote: > Hi David, you just beat me to it, but I don't think this is the best way to > fix the problem. The length check just needs to be rewritten to not > overflow. Also it seems there is another broken length check later in the > function. How about this: Okay, fair enough. Do you mind if I trim your register dump a bit? David