Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9561972ybi; Wed, 10 Jul 2019 12:28:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfmJJ8nqqOHFmMygElGOO1sVtTnCR++k0spA1kF6yASFZrpOR2hviXDs9CxivBbOH/k269 X-Received: by 2002:a17:90a:cf0d:: with SMTP id h13mr8768954pju.63.1562786937427; Wed, 10 Jul 2019 12:28:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562786937; cv=none; d=google.com; s=arc-20160816; b=JC1ZhAEH9iQYZt7twXmFrzqcxrRdoV5kG15/xVSo/3bn7xcLIKqYeHW9nEwXSuOx3t 2iWhpJUkmW6XR9qKsVYxLyVqkTd9cn/eqG09DH9K1nmmGR7MUHCBZLuihqLhtjZNNAmB 21HiccUvmM51Agbho5FwgHbOnzRPmcZO8+XxGYXzS5feUMvAXGAb4B1FUGlQBq5V7Hoe abnxWS/Q5iIxSv/NiJfzIv4Scyy8g1QQt6Q5k2//ZB5vBhZ5asDa+khX81616OsXGM9U Cc5qUnRukDfrfvVoG3H90LCnCzbiJ+xXrZyUE9aGi9iZbFzGy0NdaFJVw635iAQkxOef sfKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :mime-version:dkim-signature; bh=dmbO34ZqHStfI2tyC7TtDVBbhxIxp0PXVd1n64+drE0=; b=iASliYzkhwqiHHpbwGa/U9fm1RbonM1GVfHoWHb9dxcTlocJQakWuAun7iUz5JZGRu /0rvGJcRzk5bSe1FV1XlQjtn3gNg5m9NJYsf2U502Sqsga8bORUDCS8gOOxAgLnX5cqu sthadS2vUDiID73S+RtMbgJ2XG67GJwtjoRghtH3f5BaYdIUzz6756gJEMaMiSVWERAg D21nPxhUpCAZzuDeRH8xEl3snNJLVaY3h7cOVNYp63bvq+Xwwq3pwStUwUxu8waSlxid 19j/+AZGdfmrQKCiy3CEFBmpYLW9E2e3igWoa8NPi+X02gbtUPKfIOnQR+nSk1nLI1Kj H6wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rajagiritech-edu-in.20150623.gappssmtp.com header.s=20150623 header.b=HRta48ew; 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 e24si2878740pgh.408.2019.07.10.12.28.41; Wed, 10 Jul 2019 12:28:57 -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=@rajagiritech-edu-in.20150623.gappssmtp.com header.s=20150623 header.b=HRta48ew; 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 S1728075AbfGJRom (ORCPT + 99 others); Wed, 10 Jul 2019 13:44:42 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:37452 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727416AbfGJRol (ORCPT ); Wed, 10 Jul 2019 13:44:41 -0400 Received: by mail-pl1-f196.google.com with SMTP id b3so1584067plr.4 for ; Wed, 10 Jul 2019 10:44:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rajagiritech-edu-in.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to:cc; bh=dmbO34ZqHStfI2tyC7TtDVBbhxIxp0PXVd1n64+drE0=; b=HRta48ewWh4wUetmF/uhzeoaKvUbzTYOovVQGptvjp+13DOThY1SWptjuP/5K8XcA6 ZuKIDh+WJdYux9Qkl17HmLvGPw7NdvG4whGU32bV4//+DOYJICMIynku4p4L8jtS00UJ c8y+Re0K7yU4LAxSGwBpR/C9Ba48op3KpeJJ0h770D6vCk7ZUI3NKWexZD2Y4MrL8+83 l/Wz4cauTJALHBGjfkHJF+caw/MabdvYkooqtMFZX5KI/Yz6F9GtbBNnQoz5J7zsJfVy r1ooR88MKCmW5nTghd8s/5D27NbDJACnfOPUpcVKlydK5v1iIJdOaXTCH/zlRA+gqYHr wJnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=dmbO34ZqHStfI2tyC7TtDVBbhxIxp0PXVd1n64+drE0=; b=Fn/kjDMa2g68xaucYNDojbKuyT+sPDoYUB6sjtNCmd6iQ0WbGKBrp01FZZ67I5dXr+ 8r5Ck/kcGIeGNsX6cE6Cfn+TUWZ1EdMH1tmsgVOT6UFGmknFdy48vLP+6AOMKUW+YhsU 75Aw0vXxScboVGX1DUT1uR/wR22aYA01ZNv5M0QOqpqblSuM42+BAzu/nbTE0dSEMhRV 6caXS5CHQ/+ho4t8tMxEq6funtpvXRG9hGKUro9IYodW4zOt7HaC3tYES2XI4FtRQ6Xu uBMeQZUthugkNKbuc7fKjQmuyBZzb3aF7u5uIU1D6az4dn2hHXa6zCyacsojeJ4EbZCp xnXQ== X-Gm-Message-State: APjAAAUbEwOtQXIRnL3ugy0iL/tjper8CXLuWNDtIdDTwAr6EWQ2rY/i 1Q1cHes60rXKY+fvvLwKbjhzBfpdWNYPlZjsVxxOUg== X-Received: by 2002:a17:902:fe93:: with SMTP id x19mr37478959plm.77.1562780681028; Wed, 10 Jul 2019 10:44:41 -0700 (PDT) MIME-Version: 1.0 From: Jeffrin Thalakkottoor Date: Wed, 10 Jul 2019 23:14:04 +0530 Message-ID: Subject: BUG: KASAN: global-out-of-bounds in ata_exec_internal_sg+0x50f/0xc70 To: rostedt@goodmis.org, andriy.shevchenko@linux.intel.com, alexander.shishkin@linux.intel.com, tobin@kernel.org, ndesaulniers@google.com Cc: lkml Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hello all , i encountered a KASAN bug related . here are some related information... -------------------x-----------------------------x------------------ [ 30.037312] BUG: KASAN: global-out-of-bounds in ata_exec_internal_sg+0x50f/0xc70 [ 30.037447] Read of size 16 at addr ffffffff91f41f80 by task scsi_eh_1/149 [ 30.039935] The buggy address belongs to the variable: [ 30.040059] cdb.48319+0x0/0x40 [ 30.040241] Memory state around the buggy address: [ 30.040362] ffffffff91f41e80: fa fa fa fa 00 00 fa fa fa fa fa fa 00 00 07 fa [ 30.040498] ffffffff91f41f00: fa fa fa fa 00 00 00 00 00 00 00 03 fa fa fa fa [ 30.040628] >ffffffff91f41f80: 00 04 fa fa fa fa fa fa 00 00 fa fa fa fa fa fa [ 30.040755] ^ [ 30.040868] ffffffff91f42000: 00 00 00 04 fa fa fa fa 00 fa fa fa fa fa fa fa [ 30.041003] ffffffff91f42080: 04 fa fa fa fa fa fa fa 00 04 fa fa fa fa fa fa ---------------------------x--------------------------x---------------- $uname -a Linux debian 5.2.0-rc7+ #4 SMP Tue Jul 9 02:54:07 IST 2019 x86_64 GNU/Linux $ --------------------x----------------------------x--------------------------- (gdb) l *ata_exec_internal_sg+0x50f 0xffffffff81c7b59f is in ata_exec_internal_sg (./include/linux/string.h:359). 354 if (q_size < size) 355 __read_overflow2(); 356 } 357 if (p_size < size || q_size < size) 358 fortify_panic(__func__); 359 return __builtin_memcpy(p, q, size); 360 } 361 362 __FORTIFY_INLINE void *memmove(void *p, const void *q, __kernel_size_t size) 363 { (gdb) --------------------------x-------------------------- GNU Make 4.2.1 Binutils 2.31.1 Util-linux 2.33.1 Mount 2.33.1 Linux C Library 2.28 Dynamic linker (ldd) 2.28 Procps 3.3.15 Kbd 2.0.4 Console-tools 2.0.4 Sh-utils 8.30 Udev 241 ---------------------x--------------------------------x Thread model: posix gcc version 8.3.0 (Debian 8.3.0-7) ---------------------x--------------------------------x Please ask if more information is needed. -- software engineer rajagiri school of engineering and technology