lkml.org 
[lkml]   [2008]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] msr: Fix NULL pointer deref due to msr_open on nonexistent CPUs

* Darrick J. Wong <djwong@us.ibm.com> wrote:

> msr_open tests for someone trying to open a device for a nonexistent CPU.
> However, the function always returns 0, not ret like it should, hence userspace
> can BUG the kernel trivially. This bug was introduced by the cdev lock_kernel
> pushdown patch last May.
>
> The BUG can be reproduced with these commands:
>
> # mknod fubar c 202 8 <-- pick a number less than NR_CPUS that is not
> the number of an online CPU
> # cat fubar

applied to tip/x86/urgent - thanks Darrick.

Ingo


\
 
 \ /
  Last update: 2008-08-15 13:41    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog