Message ID | 20181001143138.95119-1-jannh@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2,1/3] mm/vmstat: fix outdated vmstat_text | expand |
On Mon, Oct 1, 2018 at 7:31 AM, Jann Horn <jannh@google.com> wrote: > commit 7a9cdebdcc17 ("mm: get rid of vmacache_flush_all() entirely") > removed the VMACACHE_FULL_FLUSHES statistics, but didn't remove the > corresponding entry in vmstat_text. This causes an out-of-bounds access in > vmstat_show(). > > Luckily this only affects kernels with CONFIG_DEBUG_VM_VMACACHE=y, which is > probably very rare. > > Fixes: 7a9cdebdcc17 ("mm: get rid of vmacache_flush_all() entirely") > Cc: stable@vger.kernel.org > Signed-off-by: Jann Horn <jannh@google.com> Reviewed-by: Kees Cook <keescook@chromium.org> -Kees > --- > mm/vmstat.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/mm/vmstat.c b/mm/vmstat.c > index 8ba0870ecddd..4cea7b8f519d 100644 > --- a/mm/vmstat.c > +++ b/mm/vmstat.c > @@ -1283,7 +1283,6 @@ const char * const vmstat_text[] = { > #ifdef CONFIG_DEBUG_VM_VMACACHE > "vmacache_find_calls", > "vmacache_find_hits", > - "vmacache_full_flushes", > #endif > #ifdef CONFIG_SWAP > "swap_ra", > -- > 2.19.0.605.g01d371f741-goog >
On Mon 01-10-18 16:31:36, Jann Horn wrote: > commit 7a9cdebdcc17 ("mm: get rid of vmacache_flush_all() entirely") > removed the VMACACHE_FULL_FLUSHES statistics, but didn't remove the > corresponding entry in vmstat_text. This causes an out-of-bounds access in > vmstat_show(). > > Luckily this only affects kernels with CONFIG_DEBUG_VM_VMACACHE=y, which is > probably very rare. > > Fixes: 7a9cdebdcc17 ("mm: get rid of vmacache_flush_all() entirely") > Cc: stable@vger.kernel.org > Signed-off-by: Jann Horn <jannh@google.com> Acked-by: Michal Hocko <mhocko@suse.com> > --- > mm/vmstat.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/mm/vmstat.c b/mm/vmstat.c > index 8ba0870ecddd..4cea7b8f519d 100644 > --- a/mm/vmstat.c > +++ b/mm/vmstat.c > @@ -1283,7 +1283,6 @@ const char * const vmstat_text[] = { > #ifdef CONFIG_DEBUG_VM_VMACACHE > "vmacache_find_calls", > "vmacache_find_hits", > - "vmacache_full_flushes", > #endif > #ifdef CONFIG_SWAP > "swap_ra", > -- > 2.19.0.605.g01d371f741-goog
diff --git a/mm/vmstat.c b/mm/vmstat.c index 8ba0870ecddd..4cea7b8f519d 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -1283,7 +1283,6 @@ const char * const vmstat_text[] = { #ifdef CONFIG_DEBUG_VM_VMACACHE "vmacache_find_calls", "vmacache_find_hits", - "vmacache_full_flushes", #endif #ifdef CONFIG_SWAP "swap_ra",
commit 7a9cdebdcc17 ("mm: get rid of vmacache_flush_all() entirely") removed the VMACACHE_FULL_FLUSHES statistics, but didn't remove the corresponding entry in vmstat_text. This causes an out-of-bounds access in vmstat_show(). Luckily this only affects kernels with CONFIG_DEBUG_VM_VMACACHE=y, which is probably very rare. Fixes: 7a9cdebdcc17 ("mm: get rid of vmacache_flush_all() entirely") Cc: stable@vger.kernel.org Signed-off-by: Jann Horn <jannh@google.com> --- mm/vmstat.c | 1 - 1 file changed, 1 deletion(-)