From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.10 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796278848; b=myDgHjQBqCaiw8K/jMGxd4tAwS+XKWF4twx7b09bWOPr1pJ1k2AhDapon5a0NGx5QZ6j NFUNeoeCpCoaAdN9+KjB4dYzDj1YXi6gUuxPfqtWiOb76MPghcXNgEJY9RQW7I9p/18j5 2nJOADI2Yf1s06k1tAkL2CEebmkMas3fp3sflXIbLvvJ0t9qQJo9e+eapiIlYxqnI4GyT 4CutPS2sPd18WOT20AqFhPPhFfdfj5qWcw4Zqbj2W0a3tdgYgb+CDs0Krz7o0psQ5ujrN 5md/U5tq5cYlrm2vQx/MiK1RjOv2gMZfr+UzkhtEUTnWWo0cdRA+gR2Mh1Pc7sCDHWg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796278848; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Date:From:To: Cc:Subject:Message-ID:User-Agent; bh=mjMT7/o+CQHlTVnsUwsBLtlFxw3Mrbr8b7Nz/kQzYB8=; b=ZjB86xiYLJuPMNGhE1Pq5yUfzuHp7c6Je7GL6I2LIbgwbPPGW6Gr/p92Cl4o40idw/9j tOkBYEU55bqwp5K9WSCnjqnQaR2fYrBblWG/eFOxgL+PSQCuOMkom3qQ/C3thVg16/smq DKbgkG+6a1RQmzRx5KuZ6MgdrauLuAhXsmvUXrIHEBlRphsbOFqvIITOcNy/bM+2qZldH hYMC+Q8VZgrJ618olPPp5SI29O5Mvojl0ZIFIIKVHDdlI6a8/rS3qF8UOaiOgG8CfCeFB 0NCPbdL562/y+iVq+ZMxHsElXW6x21KHNZyI4iprPdTn9PN2iOE14Q0vAHi6Vm6IcDg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=AgFeNoVe; arc=none smtp.remote-ip=198.175.65.10 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF16A606A32C for ; Thu, 3 Dec 2026 06:20:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BF16A606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=AgFeNoVe DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796278848; x=1827814848; h=date:from:to:cc:subject:message-id; bh=mjMT7/o+CQHlTVnsUwsBLtlFxw3Mrbr8b7Nz/kQzYB8=; b=AgFeNoVe3gW0wYxvG7skDBkhy8Gt/LgNdkzUk1NgNMtuWf1fsGowIx60 pKNBVoPjxQMhCwORUYGq6PWun/KCA5vpVhceMCfUpy9LjCQI8z2U+2f/Y EICBC50UOWaiHBqyFd/1sgpDr0aMIOemY3hWTqWV3HOEJc9WgARF5MO8R plt/rbvjvWcpWVHuVBKCThCg3/jzFWUqSCLPyV2Ce3VcBAWnpWFrJ6FvW 7pTUZdx7y4UN4lE1fXGMhDHJkAEu8A3h7C5MXef86eHkbneoTxlNWi62y QRq+b6DDpQeK/6lQx9NWIcOJbY5mQCmXWMHVB+we6+1nW4iW3X4NVlIeu A==; X-CSE-ConnectionGUID: NGLeOHy0R9aEsJTCT8Uh3A== X-CSE-MsgGUID: 78E72J4kTdSVLFBZByXTsw== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5162465" X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="5162465" Received: from fmviesa011.fm.intel.com ([10.60.135.151]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2026 22:20:47 -0800 X-CSE-ConnectionGUID: EEKkq8HaThW15ajNF/Wcew== X-CSE-MsgGUID: oZtEBinSSl65K1CPvg6khA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="15475977" Received: from igk-lkp-server01.igk.intel.com (HELO 146cf1e082f1) ([10.211.93.152]) by fmviesa011.fm.intel.com with ESMTP; 02 Dec 2026 22:20:47 -0800 Received: from kbuild by 146cf1e082f1 with local (Exim 4.98.2) (envelope-from ) id 1xZ0BQ-000000003YI-13lj; Thu, 03 Dec 2026 06:20:44 +0000 Date: Thu, 03 Dec 2026 07:19:47 +0100 From: kernel test robot To: oe-kbuild@lists.linux.dev Cc: lkp@intel.com, Dan Carpenter Subject: [rcu:dev 54/57] kernel/rcu/rcutorture.c:4683 rcu_test_kasan() error: dereferencing freed memory 'rhp' (line 4681) Message-ID: <20261203071009.B1Ru5CSM-lkp@intel.com> User-Agent: s-nail v14.9.25 X-Mailing-List: oe-kbuild@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Unfiltered warning: this smatch report is sent as-is and has not been reviewed for false positives, so please treat it with due skepticism. BCC: lkp@intel.com CC: oe-kbuild-all@lists.linux.dev TO: Kunwu Chan CC: Joel Fernandes tree: https://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux.git dev head: 7c5d6e978b03d7d1e028adfbfed3ea41823a172e commit: 1c9be559fe2063016a8537eed09f3869f6e1a3b1 [54/57] rcutorture: Add KASAN aux-stack self-test :::::: branch date: 13 hours ago :::::: commit date: 13 hours ago config: x86_64-randconfig-2200-20261203 (https://download.01.org/0day-ci/archive/20261203/20261203071009.B1Ru5CSM-lkp@intel.com/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 smatch: v0.5.0-9187-g5189e3fb If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/20261203071009.B1Ru5CSM-lkp@intel.com/ smatch warnings: kernel/rcu/rcutorture.c:4683 rcu_test_kasan() error: dereferencing freed memory 'rhp' (line 4681) vim +/rhp +4683 kernel/rcu/rcutorture.c d2818df168b2c80c kernel/rcutorture.c Paul E. McKenney 2013-04-23 4647 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4648 /* 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4649 * Trigger a KASAN use-after-free report after draining a callback. Check 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4650 * "Last potentially related work creation" for the callback enqueue stack. 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4651 */ 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4652 static noinline void rcu_test_kasan(void) 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4653 { 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4654 struct rcu_head *rhp; 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4655 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4656 if (!IS_ENABLED(CONFIG_KASAN_GENERIC)) { 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4657 pr_alert("%s: !CONFIG_KASAN_GENERIC, not testing KASAN aux stack call_%s()\n", 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4658 KBUILD_MODNAME, cur_ops->name); 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4659 return; 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4660 } 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4661 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4662 if (!cur_ops->call || !cur_ops->cb_barrier) { 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4663 pr_alert("%s: %s has no callback/barrier ops, skipping KASAN test\n", 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4664 KBUILD_MODNAME, cur_ops->name); 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4665 return; 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4666 } 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4667 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4668 rhp = kmalloc_obj(*rhp); 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4669 if (!rhp) { 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4670 pr_alert("%s: KASAN aux-stack test skipped: allocation failed\n", KBUILD_MODNAME); 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4671 return; 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4672 } 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4673 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4674 pr_alert("%s: WARN: KASAN aux-stack call_%s() test starting.\n", 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4675 KBUILD_MODNAME, cur_ops->name); 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4676 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4677 /* Keep the rcu_head allocated until all callbacks have completed. */ 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4678 cur_ops->call(rhp, rcu_torture_leak_cb); 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4679 cur_ops->cb_barrier(); 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4680 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 @4681 kfree(rhp); 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4682 /* Intentional use-after-free to display the recorded enqueue stack. */ 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 @4683 (void)READ_ONCE(*(u8 *)rhp); 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4684 pr_alert("%s: WARN: KASAN aux-stack call_%s() test complete.\n", 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4685 KBUILD_MODNAME, cur_ops->name); 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4686 } 1c9be559fe206301 kernel/rcu/rcutorture.c Kunwu Chan 2026-11-28 4687 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki