Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp710123imm; Sat, 7 Jul 2018 07:04:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeXbwryQdHG2d+5Ti8MCW+6q+wzBMA6Ym96S/35RAAXqWrlVKb0U4EmjDMqKjIlLW6q2BNW X-Received: by 2002:a17:902:8a95:: with SMTP id p21-v6mr13957395plo.91.1530972286554; Sat, 07 Jul 2018 07:04:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530972286; cv=none; d=google.com; s=arc-20160816; b=lJZ+W7328BqWlyj3tZgJB5nfEwBm3/E0sebwm5GfCGwZPqnESuitlhrp/NcjCgKNMs THNflQZQ6tDCoDHfhlmJOSUnG/Y8/Fab7bIBq2dvwE+9DGbpE1HlpAtUcr7ROs51We6U NwPQ1JaAURzGWqLuyNgXDE1lVb4qKjwPDVJU2vMw26UhTMFtQlxJDMlx1a7tG0hdghUZ YvLJLFMsE2xiruf6EvEUnMo7GRrfuy5X1xi1puE3PNMQ9OBfDm1Z+yPEPQgHPbQq2y5f qcKdZfIn/C+EsYvtYl1sAj6oGdBHCdUb+DpMpckK3jLQZFgwvXIQq/ragTwFzvthC5Gs SMzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date:arc-authentication-results; bh=ULMsVaIvYHi+QevyT8DVDBdaMMx8DoRaulIFTPDwUc8=; b=mcSsDyGY/Fwg38TnxV/szql91a/72xeujy5pEe2Sn/OhenxqeRe5QMzaBTh5qGRRyM nKe8QeLse7uxYv5dUk8iBLRKlcg6/Emj3LtPDPaABJMHLBBpzRQ+oLVaPfz7qtfUYS6G oXxa/xbYwSyagj/dLRaUaf0h8CV19RP6gwvcelPuHVIung5j4Xe/BGVRTbIrF0RShN2k yhnKl/7FOxl3GiTt2MO9wk4joWr5WNqbI4dngJFmh6DWbZRc5HtB93ld7bmnTLwX5Nje 229twrFQO5q11HSKAUocSs5LleGE5D8vQfbd5dcqNrVC3JRahL+mD9HTl0Lx58vOJ3SL HTTg== 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 m24-v6si4480094pfk.56.2018.07.07.07.04.30; Sat, 07 Jul 2018 07:04: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 S1753937AbeGGODt (ORCPT + 99 others); Sat, 7 Jul 2018 10:03:49 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:52230 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753173AbeGGODs (ORCPT ); Sat, 7 Jul 2018 10:03:48 -0400 Received: from localhost (unknown [37.168.185.56]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E0958DB7; Sat, 7 Jul 2018 14:03:46 +0000 (UTC) Date: Sat, 7 Jul 2018 16:03:43 +0200 From: Greg Kroah-Hartman To: Samuel Thibault , Jann Horn , William Hubbs , Chris Brannon , Kirk Reiser , 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: <20180707140343.GA7052@kroah.com> References: <20180707015344.146672-1-jannh@google.com> <20180707082926.66zbedgq5zqjfbjx@var.youpi.perso.aquilenet.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180707082926.66zbedgq5zqjfbjx@var.youpi.perso.aquilenet.fr> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 07, 2018 at 10:29:26AM +0200, Samuel Thibault wrote: > Re, > > Could you review, test, and resubmit the patch below instead? > > Samuel > > > If softsynthx_read() is called with `count < 3`, `count - 3` wraps, causing > the loop to copy as much data as available to the provided buffer. If > softsynthx_read() is invoked through sys_splice(), this causes an > unbounded kernel write; but even when userspace just reads from it > normally, a small size could cause userspace crashes. > > Fixes: 425e586cf95b ("speakup: add unicode variant of /dev/softsynth") > Cc: stable@vger.kernel.org > Signed-off-by: Samuel Thibault You forgot a "reported-by:" line :( also, I already applied Jann's patch, so could you either just send the fixup, or a revert/add of this patch once you all agree on the proper solution here? thanks, greg k-h