Re: [patch] mm: sparsemem memory_present() memory corruption fix

From: Ingo Molnar
Date: Tue Apr 15 2008 - 20:35:33 EST



small addendum to the changelog:

> if (!ms->section_mem_map)
> ms->section_mem_map = sparse_encode_early_nid(nid) |
+ | SECTION_MARKED_PRESENT
>
> 'ms' will be out of bounds and we'll corrupt a small amount of memory by
> encoding the node ID. Depending on what that memory is, we might crash,
> misbehave or just not notice the bug.

the corruption might happen when encoding a non-zero node ID, or due to
the SECTION_MARKED_PRESENT which is 0x1:

mmzone.h:#define SECTION_MARKED_PRESENT (1UL<<0)

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/