[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1fec6a8b-7083-4b08-858a-0793f996ed52@I-love.SAKURA.ne.jp>
Date: Tue, 5 Mar 2024 19:17:35 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: syzbot <syzbot+cb76c2983557a07cdb14@...kaller.appspotmail.com>,
linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [hardening?] [mm?] BUG: bad usercopy in fpa_set
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index c421a899fc84..29b28961637c 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -573,8 +573,10 @@ static int fpa_get(struct task_struct *target,
const struct user_regset *regset,
struct membuf to)
{
- return membuf_write(&to, &task_thread_info(target)->fpstate,
- sizeof(struct user_fp));
+ struct thread_info *thread = task_thread_info(target);
+
+ return membuf_write(&to, &thread->fpstate,
+ sizeof(thread->fpstate));
}
static int fpa_set(struct task_struct *target,
@@ -586,7 +588,7 @@ static int fpa_set(struct task_struct *target,
return user_regset_copyin(&pos, &count, &kbuf, &ubuf,
&thread->fpstate,
- 0, sizeof(struct user_fp));
+ 0, sizeof(thread->fpstate));
}
#ifdef CONFIG_VFP
Powered by blists - more mailing lists