Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp205435imd; Fri, 26 Oct 2018 07:21:28 -0700 (PDT) X-Google-Smtp-Source: AJdET5fj7o/evvzC5fXozGHDqECHHUd7ARxQz22OZOPl0jvA3IFObJXFl06sRznUL1qHEJjODD+g X-Received: by 2002:a17:902:4683:: with SMTP id p3-v6mr3766800pld.215.1540563688293; Fri, 26 Oct 2018 07:21:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540563688; cv=none; d=google.com; s=arc-20160816; b=H9yvuuCq315ykLevHYJCCsqY83iuBGvQeXOF+gSi2Jx0/NrqEiWphzjlDkMTQHlISY GV+TJwpaAqrpr8hDNuKf0mKfyE85j4u1DG+t4q/NgepYcKyod0P/oUcbYwGT2Y7oc03Y Hcb/K4HVuOlVk3rvRX8ITvrdil5vdocDGbxqmJtsEuAmBztKK4fPpLAkks+/rLzn0Jlw L0ubFAY2uJ3bhxKw/fqOPmhxWyA6nO5B4/VFUetXufSaSPKe9NXPMn2P1GNtWE3FksP2 sWz192CmCOb3+Ib4nzO6NzzaBvGX3hfy+iArQ2ojoDlA6qocvpQK/bPadkMtIxOOP9Rs bPAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=0zCMwBAm09F25IZwarKsjQDcRDxEIhwYjtSkPUkHv/s=; b=0P/tdh8lDc7ns6Dev2t1Y2aY2GGYi2JMnBKjZ8ulp6RU4ZnxsfsWq1zXvEYgs3Bd7C gcHtVTBxpPRCeCY5VxIBvQ87ePfo9GjiInHl6ztC5uDuj2CohA7vq6pzUfD37HHpkVia U5pipFR1aLTDH/n43S2OzOvF9y9FKlbBWhaz9Hs7aa5vyJ1V40Ig3SNkKL23vpjIBoT9 +dOlO0bnTxkuXt3GvCx+bERDiCTCrFwcJ2Ll+ZLhEchibOpqFcX5/6VkiW90K37vP+IY o9Q24QCIfWSmfLH0dwvT/DhBRMnAkNv7JxUBDwKfaD3bbt9UHJMeJtuoZAOKcdHaurT/ t/Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=HUc4JIKi; 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 s186-v6si2849846pfb.129.2018.10.26.07.20.56; Fri, 26 Oct 2018 07:21:28 -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; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=HUc4JIKi; 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 S1727020AbeJZW53 (ORCPT + 99 others); Fri, 26 Oct 2018 18:57:29 -0400 Received: from mail-it1-f195.google.com ([209.85.166.195]:50206 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726686AbeJZW52 (ORCPT ); Fri, 26 Oct 2018 18:57:28 -0400 Received: by mail-it1-f195.google.com with SMTP id k206-v6so1716756ite.0 for ; Fri, 26 Oct 2018 07:20:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0zCMwBAm09F25IZwarKsjQDcRDxEIhwYjtSkPUkHv/s=; b=HUc4JIKiqQfJgYrtEWqe9AyPXO+cav146N/2ddXWCrR/9dItBi1h0KEI7p0KHRsdMF 5PwweDmU34+Awtcx2727aR3RbUBibrUzp3sr8lT9nzhvWlZA8AdRj56tiNaPmR/6ZoxY UNCJMmxeKZAzuS5Q160C1aNIPpkMUCI4Dc78kpIdXNXvU7sn6E/DmAw1XC7JLZ7y8wYF DYR6Rnsql+nebdh5PorkigHwPKNz8WlsKFthExvsueRbjEdx0LPaAmd8zppriJlxRAuD LJfqnQVBLHGG7L463kuEXp6u5TDI+FNzTEk3JartFiQwFPDUJZ7rP8A1DtSPozAAnEpt f/4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0zCMwBAm09F25IZwarKsjQDcRDxEIhwYjtSkPUkHv/s=; b=Sp9/0XNmiOnkxlXiyRufQFask2u88mMvzv6Rdp2/Palm8rbaJfmvmaJPC5CGFDaMPv Cch0DouXn3pqModhJ3td5fyGoQF+/7zUpOu/QREs3/Pyref59rYMPpGP7nLeDl0+u3rO z1xN+GSCyTPkdXrIdjSSUN1M8HozahpTeXyNoV16+0ab5rHumDmwoHp3BAIcyRs6mKEK 4GjLCuSRHFdyb3Kwx1S55enjFKipRXkl4uEzavyhLSwc4H6KRlHHWxO347BvHG9gyRgK 66HMSbGz5V4/tdlgAQr+1RdSsxsk2aPNG/4Xe93KO+R8ZdInGZqgFvqtwcUeEPYpZTep 49nQ== X-Gm-Message-State: AGRZ1gLGufGUFFRL71LvkzEEr3TyATuB1dTyNZuP66U08kPTzTeXqrke yP9j9Z4kWq7/VIjhIWjhF2GmUA== X-Received: by 2002:a24:e20e:: with SMTP id q14-v6mr440669ith.55.1540563612674; Fri, 26 Oct 2018 07:20:12 -0700 (PDT) Received: from [192.168.1.56] ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id d21-v6sm3820526ioc.32.2018.10.26.07.20.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Oct 2018 07:20:10 -0700 (PDT) Subject: Re: UBSAN: Undefined behaviour in drivers/block/floppy.c:1495:32 To: Kyungtae Kim Cc: jikos@kernel.org, Byoungyoung Lee , DaeRyong Jeong , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller@googlegroups.com References: From: Jens Axboe Message-ID: <9206bb2f-b11f-cd57-819a-81438b388124@kernel.dk> Date: Fri, 26 Oct 2018 08:20:09 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/26/18 7:22 AM, Kyungtae Kim wrote: > I corrected the patch as follows: OK, we're getting there! Please resend as a separate email, so that the subject line is the patch header, and just the commit message in the body. I'd fix that up for this one, but you also need to fix up: > diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c > index a8cfa01..41160a1 100644 > --- a/drivers/block/floppy.c > +++ b/drivers/block/floppy.c > @@ -3146,6 +3146,9 @@ static int raw_cmd_copyin(int cmd, void __user *param, > */ > return -EINVAL; > > + if (ptr->cmd_count > ARRAY_SIZE(ptr->cmd)) > + return -EINVAL; > + This needs to use tabs, not two spaces. Look at the surrounding code - if yours looks differently, then you should correct that. -- Jens Axboe