Forwarded: Re: [syzbot] [kernel?] KASAN: slab-out-of-bounds Read in change_page_attr_set_clr

syzbot posted 1 patch 2 weeks, 5 days ago
Forwarded: Re: [syzbot] [kernel?] KASAN: slab-out-of-bounds Read in change_page_attr_set_clr
Posted by syzbot 2 weeks, 5 days ago
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.

***

Subject: Re: [syzbot] [kernel?] KASAN: slab-out-of-bounds Read in change_page_attr_set_clr
Author: chandna.linuxkernel@gmail.com

#syz test

--- a/arch/x86/mm/pat/set_memory.c
+++ b/arch/x86/mm/pat/set_memory.c
@@ -305,6 +305,9 @@ static inline unsigned long fix_addr(unsigned long addr)

  static unsigned long __cpa_addr(struct cpa_data *cpa, unsigned long idx)
  {
+       if (WARN_ON_ONCE(!cpa->pages || !cpa->pages[idx]))
+               return 0;
+
         if (cpa->flags & CPA_PAGES_ARRAY) {
                 struct page *page = cpa->pages[idx];

-- 
2.51.0