Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1252483ybi; Tue, 16 Jul 2019 11:59:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxaZ4zI89zoLYMkgxxbpaRPOOKYs8InQTq6wqrMykFPSNEgImNLt2Ch3aj7aPjf9/QCLLFl X-Received: by 2002:a17:902:e210:: with SMTP id ce16mr38167940plb.335.1563303574384; Tue, 16 Jul 2019 11:59:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563303574; cv=none; d=google.com; s=arc-20160816; b=oOLFHyckBkTexth/Zno0H1hrCzTvVP1lPZpiFjrhSXGJwC/99QM1htPV0EqlVAuCi8 6q39BEa9VZTmP5WqFeVzrHvMRTEnYno/zvFopeokSrWQWbAK+IVN4u4+20s2USni3+YW wBeFe2aLSautKNCOtnOF2Yl7Fi041EATnEjHRLEfQWw2s4J0QDe2lbxLvPCUQyGH1sz7 Zj2GoI/H4WwIqeFRbm122jgm511Kysgb8YlROxyb0wP4d31PBFBTuXCrMzIvBd5Hhmtq QQO5IDZcm5VTyGw0+IlRbMaTdTSWWx/bSEyZtYYCNrW/PxIKw4paUOD6kpYlT9XTzR4U F79Q== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=vczC/EDqEE/v0SPweowVruASBRgT+NLnccfV8B5mNRc=; b=dLICtZJYcg/LoNyu3oUM9C2FzRwveU0/394Q+Xa1Cj2H+6PlQHvK5BNaykOksJJacA SnpP7ElKniUvQOMsoZwH7Xysmy/bS5MD57z906QudqSY0p9xjytbJql1k65LONfX92Mr O5tmrng5xlllKTGRiezjrinhQDFWGzWfY/z3b/jnCkIuxtye9bsMu+lj0GloAHkVp8Lm uBjEfmfkn3bwPN/RVAnP22hcdYKceXdKltm7gPbhJ7gXPvzW+jmR2bh4JIKR3Ym/S6Ip 29/1U8dUOIu5R9J7g9BpS99aoiO4xfRV68/7WHgr9ify4bIc1Z6ZzV4EXNRSF8B2B73J 9SYg== 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 q10si20440032pjq.46.2019.07.16.11.59.17; Tue, 16 Jul 2019 11:59:34 -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 S2388317AbfGPS5U (ORCPT + 99 others); Tue, 16 Jul 2019 14:57:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:35354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728137AbfGPS5U (ORCPT ); Tue, 16 Jul 2019 14:57:20 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6B19C20665; Tue, 16 Jul 2019 18:57:18 +0000 (UTC) Date: Tue, 16 Jul 2019 14:57:16 -0400 From: Steven Rostedt To: Nick Desaulniers Cc: Jeffrin Thalakkottoor , Andy Shevchenko , Alexander Shishkin , tobin@kernel.org, lkml , Kees Cook , Dmitry Vyukov , Alexander Potapenko Subject: Re: BUG: KASAN: global-out-of-bounds in ata_exec_internal_sg+0x50f/0xc70 Message-ID: <20190716145716.6b081bdc@gandalf.local.home> In-Reply-To: References: X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 16 Jul 2019 11:28:29 -0700 Nick Desaulniers wrote: > The cited code looks like a check comparing that the pointer distance > is greater than the size of bytes being passed in. I'd wager > someone's calling memmove with overlapping memory regions when they > really wanted memcpy. Maybe a better question, is why was memmove > ever used; if there was some invariant that the memory regions > overlapped, why is that invariant no longer holding. I'm confused by the above statement as memmove() allows overlapping of src and dest, where as memcpy() does not. -- Steve