Re: Patch "tracing: Fix possible NULL pointer dereferences" has been added to the 3.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greg,

I noticed this patch has been merged into 3.2, 3.5, 3.6 and 3.8, but it was never
queued for 3.0 or 3.4. Seems something went wrong, and I actually can trigger
this bug in 3.4 stable kernel.

On 2013/4/15 2:33, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
> 
> This is a note to let you know that I've just added the patch titled
> 
>     tracing: Fix possible NULL pointer dereferences
> 
> to the 3.8-stable tree which can be found at:
>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> 
> The filename of the patch is:
>      tracing-fix-possible-null-pointer-dereferences.patch
> and it can be found in the queue-3.8 subdirectory.
> 
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@xxxxxxxxxxxxxxx> know about it.
> 
> 
>>From 6a76f8c0ab19f215af2a3442870eeb5f0e81998d Mon Sep 17 00:00:00 2001
> From: Namhyung Kim <namhyung.kim@xxxxxxx>
> Date: Thu, 11 Apr 2013 15:55:01 +0900
> Subject: tracing: Fix possible NULL pointer dereferences
> 
> From: Namhyung Kim <namhyung.kim@xxxxxxx>
> 
> commit 6a76f8c0ab19f215af2a3442870eeb5f0e81998d upstream.
> 
> Currently set_ftrace_pid and set_graph_function files use seq_lseek
> for their fops.  However seq_open() is called only for FMODE_READ in
> the fops->open() so that if an user tries to seek one of those file
> when she open it for writing, it sees NULL seq_file and then panic.
> 
> It can be easily reproduced with following command:
> 
>   $ cd /sys/kernel/debug/tracing
>   $ echo 1234 | sudo tee -a set_ftrace_pid
> 
> In this example, GNU coreutils' tee opens the file with fopen(, "a")
> and then the fopen() internally calls lseek().
> 
> Link: http://lkml.kernel.org/r/1365663302-2170-1-git-send-email-namhyung@xxxxxxxxxx
> 
> Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
> Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Namhyung Kim <namhyung.kim@xxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> 
> ---
>  include/linux/ftrace.h     |    2 +-
>  kernel/trace/ftrace.c      |   10 +++++-----
>  kernel/trace/trace_stack.c |    2 +-
>  3 files changed, 7 insertions(+), 7 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]