Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp474366imm; Sat, 7 Jul 2018 01:14:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd6Feh82X6h8K8At7hu1RHHCN5Gfm4+FeB6qdhnQ1hsNkq4k3L+2bfUz6IJ1vGfYkZEoxjz X-Received: by 2002:a63:5624:: with SMTP id k36-v6mr11999303pgb.146.1530951286513; Sat, 07 Jul 2018 01:14:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530951286; cv=none; d=google.com; s=arc-20160816; b=MxHYMKioJUsfCy4VlF96j1fJHbQHrc+OYjRtSNyGXMXyApC2f/UlWv4OvYNxX8DEUo uHHrMmSjox7IIF6bC5bZdQZQPlOuYjya+WRrRbksmE0kzhbbv4z9VAXHPAyt6k9A6EYs wnCyreNl8Ece6OUuqkMd9ph4FZv00nyRP/Csp4wBu/2VPPXUq+co6eFEo2UjS0uGIPM4 LorDZ2nsanWnhEGcUhXkTudmHj8yfs9NuRvsXYQ1nnXLBwL2aw7mFCJ8paIuWjiHgQMn GTpHapnv9FHiTSn/HXWmZ46NCG8KcKgZrJ7p8s816BOW7PV7fQPWTOvgD57xyq/nBZWK sOIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=YnnPDR5Zka2bZ0bxxvmtmNyOhjgUChWefdOpzd7iYzI=; b=BWLK2kIXEE26FsmbQLPueTOtrM99FeCtA7RWog/chxqFFg5bV9I96O+ts4uvYW14WP dv2T2HXzVqrnrvTwBX+fDQKrhxVKWUGHb4Vttt/1N+pAQgX3Uw+rk3Vd11YhZfWzSyiH f34I7i4eY76vIKIKJ/GRa5Lg0etFJE7fRHuOLDrDdZIqrzz59v0r16Q+jxKIsENzNWEU 92Pax2gNiFJgZW20s6oWrmQSkmLtsU76fDmiUic1fbtJsBGRHBocKf3W7NGldlAIVj3E i9TliNaDHx5dH2LMlJZpNe7+FDNGXsgb9Ugv8D7Ez7CN6Odm3MSeftJH14BwGd4gUPQu e41A== 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 p129-v6si10261918pfb.145.2018.07.07.01.14.32; Sat, 07 Jul 2018 01:14:46 -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 S1752825AbeGGINx (ORCPT + 99 others); Sat, 7 Jul 2018 04:13:53 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:56144 "EHLO hera.aquilenet.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751693AbeGGINu (ORCPT ); Sat, 7 Jul 2018 04:13:50 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id AE099CDE; Sat, 7 Jul 2018 10:13:48 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pIDrT28NW_Ev; Sat, 7 Jul 2018 10:13:47 +0200 (CEST) Received: from var.youpi.perso.aquilenet.fr (dhcp-64-205.ens-lyon.fr [140.77.64.205]) by hera.aquilenet.fr (Postfix) with ESMTPSA id D791273E; Sat, 7 Jul 2018 10:13:47 +0200 (CEST) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.91) (envelope-from ) id 1fbiLj-0001KD-D1; Sat, 07 Jul 2018 10:13:47 +0200 Date: Sat, 7 Jul 2018 10:13:47 +0200 From: Samuel Thibault To: Jann Horn Cc: William Hubbs , Chris Brannon , Kirk Reiser , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, speakup@linux-speakup.org, devel@driverdev.osuosl.org Subject: Re: [PATCH] staging: speakup: fix wraparound in uaccess length check Message-ID: <20180707081347.czde44j6rjepjpkf@var.youpi.perso.aquilenet.fr> Mail-Followup-To: Samuel Thibault , Jann Horn , William Hubbs , Chris Brannon , Kirk Reiser , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, speakup@linux-speakup.org, devel@driverdev.osuosl.org References: <20180707015344.146672-1-jannh@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180707015344.146672-1-jannh@google.com> Organization: I am not organized User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jann Horn, le sam. 07 juil. 2018 03:53:44 +0200, a ecrit: > @@ -257,6 +257,8 @@ static ssize_t softsynthx_read(struct file *fp, char __user *buf, size_t count, > 0x80 | (ch & 0x3f) > }; > > + if (chars_sent + 2 > count) > + break; > if (copy_to_user(cp, s, sizeof(s))) > return -EFAULT; Err, but then we have lost 'ch' that was consumed by the synth_buffer_getc() call, so the fix seems wrong to me. Nacked-by: Samuel Thibault Samuel