[syzbot] [hardening?] [mm?] BUG: bad usercopy in fpa_set
Tetsuo Handa
penguin-kernel at I-love.SAKURA.ne.jp
Fri Apr 5 07:28:20 PDT 2024
On 2024/04/04 1:12, Russell King (Oracle) wrote:
> Therefore, there is _no way_ for fpa_set() to overwrite anything
> outside of thread_info->fpstate, because sizeof(struct user_fp)
> is smaller than sizeof(thread->fpstate).
>
> Syzbot appears to be wrong in this instance.
>
Thanks for clarification.
I came to suspect that commit 08626a6056aa ("arm: Implement thread_struct
whitelist for hardened usercopy") missed that ptrace(PTRACE_SETFPREGS)
needs to declare a usercopy whitelist. It seems to me that
https://syzkaller.appspot.com/text?tag=Patch&x=14c42099180000 can fix
this problem, but I'm not sure whether this is safe/correct. Can you check?
More information about the linux-arm-kernel
mailing list