Messages in this thread | | | Subject | Re: [PATCH] mm: kfence: fix handling discontiguous page | From | Muchun Song <> | Date | Fri, 24 Mar 2023 09:59:16 +0800 |
| |
> On Mar 24, 2023, at 06:18, Andrew Morton <akpm@linux-foundation.org> wrote: > > On Thu, 23 Mar 2023 10:50:03 +0800 Muchun Song <songmuchun@bytedance.com> wrote: > >> The struct pages could be discontiguous when the kfence pool is allocated >> via alloc_contig_pages() with CONFIG_SPARSEMEM and !CONFIG_SPARSEMEM_VMEMMAP. >> So, the iteration should use nth_page(). > > What are the user-visible runtime effects of this flaw?
Set the PG_slab and memcg_data to a arbitrary address (may be not used as a struct page), so the worst case may corrupt the kernel.
Thanks.
> > Thanks.
| |