Re: [PATCH] smackfs: restrict bytes count in smackfs write functions

2021-01-25 Thread Tetsuo Handa
On 2021/01/26 3:08, Casey Schaufler wrote: > On 1/24/2021 6:36 AM, Sabyrzhan Tasbolatov wrote: >> syzbot found WARNINGs in several smackfs write operations where >> bytes count is passed to memdup_user_nul which exceeds >> GFP MAX_ORDER. Check count size if bigger SMK_LONGLABEL, >> for

Re: [PATCH] smackfs: restrict bytes count in smackfs write functions

2021-01-25 Thread Casey Schaufler
On 1/24/2021 6:36 AM, Sabyrzhan Tasbolatov wrote: > syzbot found WARNINGs in several smackfs write operations where > bytes count is passed to memdup_user_nul which exceeds > GFP MAX_ORDER. Check count size if bigger SMK_LONGLABEL, > for smk_write_syslog if bigger than PAGE_SIZE - 1. > >

[PATCH] smackfs: restrict bytes count in smackfs write functions

2021-01-24 Thread Sabyrzhan Tasbolatov
syzbot found WARNINGs in several smackfs write operations where bytes count is passed to memdup_user_nul which exceeds GFP MAX_ORDER. Check count size if bigger SMK_LONGLABEL, for smk_write_syslog if bigger than PAGE_SIZE - 1. Reported-by: syzbot+a71a442385a0b2815...@syzkaller.appspotmail.com