mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+0a5079ee014f4b907817@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [kernel?] KASAN: slab-out-of-bounds Read in __futex_pivot_hash
Date: Mon,  2 Jun 2025 10:59:45 +0800	[thread overview]
Message-ID: <tencent_BEF362E363C960C3BD0448D77DF76066D105@qq.com> (raw)
In-Reply-To: <683ca389.a00a0220.d8eae.0035.GAE@google.com>

#syz test

diff --git a/kernel/futex/core.c b/kernel/futex/core.c
index 19a2c65f3d37..ea6b8266efb9 100644
--- a/kernel/futex/core.c
+++ b/kernel/futex/core.c
@@ -1754,7 +1754,10 @@ int futex_hash_prctl(unsigned long arg2, unsigned long arg3, unsigned long arg4)
 			return -EINVAL;
 		if (arg4 & FH_FLAG_IMMUTABLE)
 			flags |= FH_IMMUTABLE;
+		DEFINE_MUTEX(fha_syn);
+		mutex_lock(&fha_syn);
 		ret = futex_hash_allocate(arg3, flags);
+		mutex_unlock(&fha_syn);
 		break;
 
 	case PR_FUTEX_HASH_GET_SLOTS:


  reply	other threads:[~2025-06-02  3:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-01 19:01 syzbot
2025-06-02  2:59 ` Edward Adam Davis [this message]
2025-06-02  3:15   ` syzbot
2025-06-02  3:19 ` Edward Adam Davis
2025-06-02  3:40   ` syzbot
2025-06-02  4:37 ` [PATCH] futex: sync set the hash table slot Edward Adam Davis
     [not found] <20250601231608.2638-1-hdanton@sina.com>
2025-06-01 23:31 ` [syzbot] [kernel?] KASAN: slab-out-of-bounds Read in __futex_pivot_hash syzbot
     [not found] <20250602043805.2660-1-hdanton@sina.com>
2025-06-02  4:58 ` syzbot

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=tencent_BEF362E363C960C3BD0448D77DF76066D105@qq.com \
    --to=eadavis@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+0a5079ee014f4b907817@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /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®