Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3713496ima; Tue, 23 Oct 2018 10:03:22 -0700 (PDT) X-Google-Smtp-Source: ACcGV60WjYTpG7z94K8CD8BAZxMDFrw/sXpvzwssgtzVbvmoSyP+PCFD5SoMGiSwExpg273O4lbd X-Received: by 2002:a62:5251:: with SMTP id g78-v6mr50542018pfb.256.1540314202845; Tue, 23 Oct 2018 10:03:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540314202; cv=none; d=google.com; s=arc-20160816; b=Xzk6NC/qPEp+Vva/PpenW0QQnD+s7YabBsPzjBg5DZTVdxV9Rci2b4+M/2+/o73Imd pWk2Vt3LP3djgjn7u2lUvjrZDyZ7R1jjY/Lcb6fpVl6uxtmpTKkkb+mbMUemBkAOZrDm LM24pekJwHN5PyHP9s/iUQhiyH4QmAluXI+n9fkYdNTplBiGpCTvEO/kbtuytYc8KGvF ess+tQpLjkzLc+bDXVoRB5GEIt1Qg4zOdMVzC4gwxU8sRuzwBLAY8YI7kFRNduvMjQZW rrqlCugcAhaMfbh1vAeaZ95A0M/00LUaKIRcpvcL0/pluwnYZ12m0qWpLJ+3K2sdm35b d+/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date; bh=zXFwzLcALb3ZvT8S26VKajW5d3nYerhh9DuqMiMhuEg=; b=AsT3AtY+z7T+SSUev58dKmmqZrobZg5x3nwsUGpdlIZ7PRvolb4kpYokLZSr0UZ6/8 o3PbguOPfUP38XMwGcuncCmj5RxkY1pTUGlXyGWxtSQnUdTIkScUcIFSEf7OGtRDcHyF +IbiiIuiuW8qqajyxoPiErYqaRKYdj8uv6AxzNC+9dMgcs9GYfrAJMRQjlaUpsctINdj ReHZm89q/RshJ54fuYpKuG4QWncZy+QN+Vh50+bTfgOIDI+dkqVW4KKAPu5ypeUFPg7T npbMo7d3Jt24ZZL+L7qe5qYUDtaKapexZaxsZ30bu5hcZZAvpDVPWpl/6tMTbB0t6uPH ZoMA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g22-v6si1955838pfg.225.2018.10.23.10.02.46; Tue, 23 Oct 2018 10:03:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728434AbeJXA1i convert rfc822-to-8bit (ORCPT + 99 others); Tue, 23 Oct 2018 20:27:38 -0400 Received: from terminus.zytor.com ([198.137.202.136]:45123 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727437AbeJXA1h (ORCPT ); Tue, 23 Oct 2018 20:27:37 -0400 Received: from [IPv6:2607:fb90:3611:d0a3:6080:aaf0:a987:a514] ([172.58.37.89]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id w9NG2vXK3083724 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 23 Oct 2018 09:02:58 -0700 Date: Tue, 23 Oct 2018 09:02:47 -0700 User-Agent: K-9 Mail for Android In-Reply-To: <20181023145351.GA28516@kroah.com> References: <20181022161905.26589-1-hpa@zytor.com> <20181023145351.GA28516@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH stable v2 1/2] termios, tty/tty_baudrate.c: fix buffer overrun To: Greg Kroah-Hartman CC: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Jiri Slaby , Al Viro , Richard Henderson , Ivan Kokshaysky , Matt Turner , Thomas Gleixner , Kate Stewart , Philippe Ombredanne , Eugene Syromiatnikov , linux-alpha@vger.kernel.org, Alan Cox , stable@vger.kernel.org From: hpa@zytor.com Message-ID: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On October 23, 2018 7:53:51 AM PDT, Greg Kroah-Hartman wrote: >On Mon, Oct 22, 2018 at 09:19:04AM -0700, H. Peter Anvin (Intel) wrote: >> From: "H. Peter Anvin" >> >> On architectures with CBAUDEX == 0 (Alpha and PowerPC), the code in >tty_baudrate.c does >> not do any limit checking on the tty_baudrate[] array, and in fact a >> buffer overrun is possible on both architectures. Add a limit check >to >> prevent that situation. >> >> This will be followed by a much bigger cleanup/simplification patch. >> >> Signed-off-by: H. Peter Anvin (Intel) >> Requested-by: Cc: Johan Hovold >> Cc: Greg Kroah-Hartman >> Cc: Jiri Slaby >> Cc: Al Viro >> Cc: Richard Henderson >> Cc: Ivan Kokshaysky >> Cc: Matt Turner >> Cc: Thomas Gleixner >> Cc: Kate Stewart >> Cc: Philippe Ombredanne >> Cc: Greg Kroah-Hartman >> Cc: Eugene Syromiatnikov >> Cc: >> Cc: >> Cc: Alan Cox >> Cc: >> --- >> drivers/tty/tty_baudrate.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) > >As I think Al's big termios cleanups are going to be hitting Linus's >tree soon, do you know how these patches interact with that? > >This patch seems like it will not, so I'll be glad to queue that up >after my first round of patches get merged to Linus later this week, >but >the second one worries me. > >thanks, > >greg k-h I have been working with Al; we had approached much the same problems but from different directions. Mine ended up being a bit more comprehensive as a result, so I think we're going to end up using my code with Al's reviews. So bottom line is that it should be all good. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.