mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: syzbot <syzbot+b07ec23d35be305855be@syzkaller.appspotmail.com>
To: arnd@arndb.de, binbin.wu@linux.intel.com, bp@alien8.de,
	chao.gao@intel.com,  dapeng1.mi@linux.intel.com,
	dave.hansen@linux.intel.com, ebiggers@kernel.org,  hpa@zytor.com,
	linux-kernel@vger.kernel.org, mingo@redhat.com,
	 seanjc@google.com, syzkaller-bugs@googlegroups.com,
	tglx@kernel.org,  x86@kernel.org
Subject: [syzbot] [kernel?] KCSAN: data-race in fpu_flush_thread / skb_copy_bits
Date: Thu, 19 Nov 2026 12:26:54 -0800	[thread overview]
Message-ID: <6aff5b8e.4ea6388a.d0c9.0001.GAE@google.com> (raw)

Hello,

syzbot found the following issue on:

HEAD commit:    666539eecdf4 Merge tag 'assoc-array-fixes-v2'
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14b3c5be580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=b949a9d3c1d44ceb
dashboard link: https://syzkaller.appspot.com/bug?extid=b07ec23d35be305855be
compiler:       Debian clang version 22.1.8 (1~deb13u4), 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/a943b9915869/disk-666539ee.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/9bfd839d7ea5/vmlinux-666539ee.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0f20b9720a71/bzImage-666539ee.xz

AI-generated root cause summary:
In arch/x86/kernel/fpu/core.c, fpu_flush_thread() calls
fpstate_reset(x86_task_fpu(current)) before fpu_reset_fpstate_regs() without
holding fpregs_lock() and while TIF_NEED_FPU_LOAD may still be clear. Because
preemption and softirqs remain enabled, a context switch into __switch_to() ->
switch_fpu() (or a softirq using kernel_fpu_begin()) can observe
!TIF_NEED_FPU_LOAD and invoke save_fpregs_to_fpstate() -> os_xsave(), reading
fpstate->xfd (via xfd_validate_state()) and fpstate->xfeatures concurrently with
__fpstate_reset() modifying them. KCSAN reported the same task/CPU with an empty
read stack and a stale "skb_copy_bits" frame because preemption occurred inside
KCSAN's delay_tsc(), and __switch_to_asm switches %rsp to the next task's stack
before __switch_to() calls switch_fpu() while `current` still points to the
outgoing task, causing arch_stack_walk() to fail and return 0 frames.

full analysis:  https://syzkaller.appspot.com/x/ai_root_cause?x=b07ec23d35be305855be

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+b07ec23d35be305855be@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in fpu_flush_thread / skb_copy_bits

read to 0xffff888103fc3058 of 8 bytes by task 15366 on cpu 0:

write to 0xffff888103fc3058 of 8 bytes by task 15366 on cpu 0:
 __fpstate_reset arch/x86/kernel/fpu/core.c:-1 [inline]
 fpstate_reset arch/x86/kernel/fpu/core.c:620 [inline]
 fpu_flush_thread+0x128/0x360 arch/x86/kernel/fpu/core.c:882
 flush_thread+0x40/0x80 arch/x86/kernel/process.c:291
 begin_new_exec+0xcd0/0x1260 fs/exec.c:1235
 load_elf_binary+0x5ee/0x1a00 fs/binfmt_elf.c:1010
 search_binary_handler fs/exec.c:1777 [inline]
 exec_binprm fs/exec.c:1809 [inline]
 bprm_execve+0x480/0xaa0 fs/exec.c:1865
 do_execveat_common+0x6ba/0x720 fs/exec.c:1963
 __do_sys_execve fs/exec.c:2036 [inline]
 __se_sys_execve fs/exec.c:2030 [inline]
 __x64_sys_execve+0x5f/0x80 fs/exec.c:2030
 x64_sys_call+0x1cd2/0x2550 arch/x86/include/generated/asm/syscalls_64.h:60
 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: 0 UID: 0 PID: 15366 Comm: dhcpcd-run-hook 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

             reply	other threads:[~2026-11-19 20:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 20:26 syzbot [this message]
2026-11-19 20:53 ` Marco Elver
2026-11-19 21:11   ` Dave Hansen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6aff5b8e.4ea6388a.d0c9.0001.GAE@google.com \
    --to=syzbot+b07ec23d35be305855be@syzkaller.appspotmail.com \
    --cc=arnd@arndb.de \
    --cc=binbin.wu@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=chao.gao@intel.com \
    --cc=dapeng1.mi@linux.intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=ebiggers@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=seanjc@google.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®