Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp981995ybg; Wed, 29 Jul 2020 02:46:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyf/o8CGFIjif7T0UtI2ysWyEcItnXR/WHrJ+9tNtNtEUxfV0T7wnbPFNO+cgcVzpEuF1px X-Received: by 2002:a17:906:7709:: with SMTP id q9mr28989532ejm.123.1596016008203; Wed, 29 Jul 2020 02:46:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596016008; cv=none; d=google.com; s=arc-20160816; b=Fxnrl83jhK36RGCzSxTgMhz4GQ3rxVwSitEd2PFopqBJS193oviET/zPeyk3Zd+a1V mpnL3HF6PYGVy/3WDftN2416IinZJf3t4dHJC4zKREpps74TRCAiuz+Aa/onXiJY5dqf 4JbGmWGoLGOlB65OpCVAfFYhhEOLk9jncENGEYMYlctXF0i9aktfgxq0/gPEyCH5g3lo 5BveSKsu/EL8xaWbtaM3aUodEw89pYF3YEoT5zzug598nNfDugo+c2atmnu7gDwsMx1a o/2tu9TANdf+X0kNjO4clcpkhiLliJyy3xCj/hV9b3FeflYlMXMvgoNWp7PFT0OCwCSg aUfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=qKqsPY+0Cr+gMXTjgMZqIkPYuBQVt0J989rAmnFgmeU=; b=Lxt0pft0gai4C3ZEzY3PVWH+97aYmyfTvbg7SrGmu76srGNokuU/xU3WliKTwT8yey 6s7wp5rsc8DgpCTWUxIPkxOB3xye6kSvn/ESGRLYWH1UNeebxVwA2zmTD5SvQSwfvVcs 8zm93+GLTqWipKtFVo/UU7dd5KancgTg53p+i9Ug8HikHOaoi2LC/hSIlG3pqyxmjOBQ SoJGgUHNs0/LC3XHhse/DSFET8VF0ywF0wNOybYuuXylpmWuSSSiMcw1vMDnU0oLrmuB WjO7srQ3ZHPd1JrFtH/QhE4nr0bWumWVVG0ym1XlQf1nrkbpTLMU/41oet7LvGN3EpnT SXLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=exdMY4zA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s21si695408eja.382.2020.07.29.02.46.25; Wed, 29 Jul 2020 02:46:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=exdMY4zA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726536AbgG2JqH (ORCPT + 99 others); Wed, 29 Jul 2020 05:46:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725851AbgG2JqG (ORCPT ); Wed, 29 Jul 2020 05:46:06 -0400 Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19905C061794; Wed, 29 Jul 2020 02:46:06 -0700 (PDT) Received: by mail-qv1-xf42.google.com with SMTP id y11so7575667qvl.4; Wed, 29 Jul 2020 02:46:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qKqsPY+0Cr+gMXTjgMZqIkPYuBQVt0J989rAmnFgmeU=; b=exdMY4zALaxlGmXURUoiL4WbHOj/tNkzH0Kx4srdUzkOqbr3CT19pZFQkU2LdAMebo 7rCDri0qfWSXkeEAs7m/zfUD9Xmi5dd8uHpKLlL0Msk4rSk+HcQz2eygACEcYa8XIO6p 1HtUVDavfa/4dFho4htY+pTGJgwqdrMliIILol9FWMlICuSI9gAopyGXGQNWABScT5dZ WTx5e/JOToAMvj9xej5K+J93URQYNzEF8Z1vtCfONKCq40WzXwPiOfyuhWhWyTBH7pv7 SdsOz+t94s+MuPGEs/w30Plpxb+McqrZHne+GLkXFKtBCKpV+wbXr+wZ8//fIHhGg4ux XrVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qKqsPY+0Cr+gMXTjgMZqIkPYuBQVt0J989rAmnFgmeU=; b=Q80uku5nBAsgH8WJG5OKrKhjrYxmI/dK12YnkcJYR7NkDfN6ajPiUiwEXmDUvq+tTq wKKfMbawvaKW2/wVUuREko5hXvxqmctKr1kIfTSXe89AvFe1B7t2SbnGI4HcX4s2YSf1 ZRNhQD/sXMpsrIAjPOfp820vf8clrimRfsLBDpSlm+EVacyyN0s0TFzY9sorOVjnJCBH 4b7LDj4R/ShgQ0TYQo8WhJkJDki6H6GF5lzSOdBrUo4RzhZgyv0A7UAgys033Z7avzIw qMj1ILtji+u2Klf/xtMbIMkodaZAL+Rmjz51/zOpK6KCf/krVJGYTtKspkOaVrru8i3T noxQ== X-Gm-Message-State: AOAM532V32yOF5OB+rnP9Wup2V4qu9ihnB75xPbU2QVThzX1JaLwdSvG Cy+uSRaSx83maDfuyMfgDUDsmGM= X-Received: by 2002:ad4:4645:: with SMTP id y5mr32679485qvv.163.1596015964876; Wed, 29 Jul 2020 02:46:04 -0700 (PDT) Received: from PWN (c-76-119-149-155.hsd1.ma.comcast.net. [76.119.149.155]) by smtp.gmail.com with ESMTPSA id c70sm902307qke.109.2020.07.29.02.46.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jul 2020 02:46:04 -0700 (PDT) Date: Wed, 29 Jul 2020 05:46:02 -0400 From: Peilin Ye To: Denis Efremov Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Dan Carpenter Subject: Re: [Linux-kernel-mentees] [PATCH] block/floppy: Prevent kernel-infoleak in raw_cmd_copyout() Message-ID: <20200729094602.GA6026@PWN> References: <20200728141946.426245-1-yepeilin.cs@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 29, 2020 at 12:18:42PM +0300, Denis Efremov wrote: > > > On 7/28/20 5:19 PM, Peilin Ye wrote: > > raw_cmd_copyout() is potentially copying uninitialized kernel stack memory > > since it is initializing `cmd` by assignment, which may cause the compiler > > to leave uninitialized holes in this structure. Fix it by using memcpy() > > instead. > > > > Cc: stable@vger.kernel.org > > Fixes: 2145e15e0557 ("floppy: don't write kernel-only members to FDRAWCMD ioctl output") > > Nitpick, I would say this fix is not related to commit 2145e15e0557. I see, I will send a v2 soon. Thank you for reviewing the patch! Peilin Ye > > Suggested-by: Dan Carpenter > > Suggested-by: Arnd Bergmann > > Signed-off-by: Peilin Ye