From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.231.72 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796309860; b=XD6WNtirQA8PMvzBYN3alGCvrWsEhIK83ZMuowULcdZViqd4eLyH4+T4erT+6wm1bXED z74V6DDARa2cKBaFTR68NiZLe3WAQAHZ9GsAVdtIRIOmqjn5LyPtCRQHgC/8UR9AQQSEe sLjMWhbGRWRiFmYCTiOr1vtdiv+mK4kKIyoofFeELmYpEee9q3ESzwfhE7C3K9oNMn5HT qCSTP4EiyibXeaZpOUWfwhM0uhjyccdjwM0O8VdCDDSuNHyoXcrAyejjyWP919/D8We74 cO+POvqgr29mMGlEjoCpqrTJrvLfqxGegC6cMtOl6sAOknTr+V2SZYrxV2xoe1YrF8Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796309860; h=DMARC-Filter:Received:X-Google-DKIM-Signature:X-Gm-Message-State: MIME-Version:X-Received:Date:X-Google-Appengine-App-Id: X-Google-Appengine-App-Id-Alias:Message-ID:Subject:From:To: Content-Type; bh=rOLHs4vVEz3PGv6M8NZKUuJEvBXGns+rJY/xHSuqUkQ=; b=kpoKAy4e+MPSEk7zokbCqmQydYGFHDVvUkfYYr40SjFvFiTeqqcdsj/d2ZXCA0ewUQ00 MvK8uxRHO/76ruxLLNYf6LPICUK4GMtXRLU306Fu+zFBT1eFtf+i/wH5syNxvZ2JPtr67 /uXd2ssJ77qjIGlHKRbGzhOdZRjvQMEv0iAsVLg+ik1qDXd5d9S01t62pNCIUEC0pYMrm NU4Td3BMMGUkHKT3nI47DueOhDklWUZHgo6St1nZyau4IFjIpe7Db7+FgJk1WS7pDgoLz i19Y+F17hlN52Qlwxr1mp6tHOkZFUxykkCqKGv++fO1WeXYrFpbz0GdyylpbyDkaCZQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.remote-ip=74.125.231.72 Received: from mail-oa2-f8.google.com (mail-oa2-f8.google.com [74.125.231.72]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EDA7A606A322 for ; Thu, 3 Dec 2026 14:57:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EDA7A606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oa2-f8.google.com with SMTP id 586e51a60fabf-4adade2ee63so1951844fac.1 for ; Thu, 03 Dec 2026 06:57:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796309859; x=1796914659; h=content-type:to:from:subject:message-id:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=rOLHs4vVEz3PGv6M8NZKUuJEvBXGns+rJY/xHSuqUkQ=; b=b2dgd8wlbIcxCckk2IfC9WmmsT4RyLIfgb4Pl0P0AilGAOH4ryPsO1tISXBHrxJR41 k7MZwHJSqBDZTGx+IYCuQMp1qk2Ltw7owLzhwxRNCcxMwF4Eh5YxETN4/87YDog0cbFl NgfOCPiHh9QMstuEJuOA61/Iyrht4fm0hxJ4rKJ7qbmgaolB5udpbc4R7kPCQ6a0maJD SMF/c3FbNdBTLiYPuWpqml6G4lxiGUGN4ZrRFIdFWiMN3vGSdnvl+xxuwIhev/FulXJ8 +e+JJSJONzllhVx58lcAtBYBJNOQsyNNgcCt/1vSrHG9pA9xjm/GJ3gDoKtC2K5uao8V +Suw== X-Gm-Message-State: APuU4Z+AwjE540QuWsU9gLYkbHaQnZFEHhJ3xlTaDrkhJgVGJePUZvho YASz4xcmm9OWwcOPhep4IkQem0xw0Q+q8jfqPNk8DgqtZDhiGPTCR9D2pFwTwfnftsZSPrwxG9b CqRlcbOWIWniv3G5qK289VWnJEiuDtaDtiTE+MVw09UZAbdPYTdQ3sRBiI45Lpg== X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Received: by 2002:a05:6820:16a0:b0:71b:40c:9d5c with SMTP id 006d021491bc7-71b3942fb61mr37018616eaf.29.1796309859013; Thu, 03 Dec 2026 06:57:39 -0800 (PST) Date: Thu, 03 Dec 2026 06:57:38 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6b118362.8e3793c5.1bab8b.1377.GAE@google.com> Subject: [syzbot] [selinux?] KCSAN: data-race in selinux_inode_permission / selinux_task_to_inode From: syzbot To: linux-kernel@vger.kernel.org, omosnacek@gmail.com, paul@paul-moore.com, selinux@vger.kernel.org, stephen.smalley.work@gmail.com, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Hello, syzbot found the following issue on: HEAD commit: 693c2e04e3f1 mm: kvmalloc: Bail if called with soft or har.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=10fa3cff980000 kernel config: https://syzkaller.appspot.com/x/.config?x=12de098a40e11adc dashboard link: https://syzkaller.appspot.com/bug?extid=3857e9743aa17a4cd369 compiler: Debian clang version 22.1.8 (1~deb13u5), Debian LLD 22.1.8 Unfortunately, I don't have any reproducer for this issue yet. Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/b3a16c393bfd/disk-693c2e04.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/c61ebd019448/vmlinux-693c2e04.xz kernel image: https://storage.googleapis.com/syzbot-assets/e2fe6263b1c5/bzImage-693c2e04.xz AI-generated root cause summary: `selinux_task_to_inode()` in `security/selinux/hooks.c` updates `isec->sid` (and `isec->sclass`) on `/proc` inodes under `isec->lock` using plain writes during `pid_revalidate()` / `pid_update_inode()`. Concurrently, `selinux_inode_permission()` (and its inlined helpers `task_avdcache_search()` and `task_avdcache_update()`) reads `isec->sid` and `isec->sclass` locklessly and without `READ_ONCE()` or `data_race()` during VFS path lookup. Because `isec->sid` is also read multiple times across `avc_has_perm_noaudit()` and `task_avdcache_update()`, a concurrent update can also pair an `av_decision` computed for the old SID with the new SID in the task's `avdcache`. full analysis: https://syzkaller.appspot.com/x/ai_root_cause?x=3857e9743aa17a4cd369 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+3857e9743aa17a4cd369@syzkaller.appspotmail.com ================================================================== BUG: KCSAN: data-race in selinux_inode_permission / selinux_task_to_inode write to 0xffff88810d82b7d4 of 4 bytes by task 4030 on cpu 0: selinux_task_to_inode+0x160/0x1a0 security/selinux/hooks.c:4740 security_task_to_inode+0x39/0x50 security/security.c:3374 pid_update_inode fs/proc/base.c:2035 [inline] pid_revalidate+0x82/0xb0 fs/proc/base.c:2057 d_revalidate fs/namei.c:1041 [inline] lookup_fast+0x232/0x320 fs/namei.c:1874 walk_component fs/namei.c:2284 [inline] link_path_walk+0x528/0xde0 fs/namei.c:2662 path_openat+0x142/0x11e0 fs/namei.c:5012 do_file_open+0x16c/0x290 fs/namei.c:5045 do_sys_openat2+0xa1/0x140 fs/open.c:1443 do_sys_open fs/open.c:1449 [inline] __do_sys_openat fs/open.c:1465 [inline] __se_sys_openat fs/open.c:1460 [inline] __x64_sys_openat+0xf2/0x120 fs/open.c:1460 x64_sys_call+0x1f72/0x2550 arch/x86/include/generated/asm/syscalls_64.h:258 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x11e/0x3a0 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f read to 0xffff88810d82b7d4 of 4 bytes by task 4029 on cpu 1: selinux_inode_permission+0x3e6/0x740 security/selinux/hooks.c:-1 security_inode_permission+0x73/0xb0 security/security.c:1865 inode_permission+0x1e3/0x3c0 fs/namei.c:661 lookup_inode_permission_may_exec fs/namei.c:-1 [inline] may_lookup fs/namei.c:1967 [inline] link_path_walk+0x881/0xde0 fs/namei.c:2610 path_openat+0x142/0x11e0 fs/namei.c:5012 do_file_open+0x16c/0x290 fs/namei.c:5045 do_sys_openat2+0xa1/0x140 fs/open.c:1443 do_sys_open fs/open.c:1449 [inline] __do_sys_openat fs/open.c:1465 [inline] __se_sys_openat fs/open.c:1460 [inline] __x64_sys_openat+0xf2/0x120 fs/open.c:1460 x64_sys_call+0x1f72/0x2550 arch/x86/include/generated/asm/syscalls_64.h:258 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x11e/0x3a0 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f Reported by Kernel Concurrency Sanitizer on: CPU: 1 UID: 0 PID: 4029 Comm: syz.4.97 Not tainted syzkaller #0 PREEMPT(lazy) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 ================================================================== --- This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. If the report is already addressed, let syzbot know by replying with: #syz fix: exact-commit-title If you want to overwrite report's subsystems, reply with: #syz set subsystems: new-subsystem (See the list of subsystem names on the web dashboard) If the report is a duplicate of another one, reply with: #syz dup: exact-subject-of-another-report If you want to undo deduplication, reply with: #syz undup