Re: [PATCH v2] vmcore: prevent PT_NOTE p_memsz overflow during header update

2014-02-05 Thread Vivek Goyal
On Mon, Feb 03, 2014 at 10:57:58PM +, Pearson, Greg wrote: > On 02/03/2014 02:38 PM, Vivek Goyal wrote: > > On Mon, Feb 03, 2014 at 01:18:38PM -0700, Greg Pearson wrote: > > > > [..] > >> diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c > >> index 2ca7ba0..051c803 100644 > >> ---

Re: [PATCH v2] vmcore: prevent PT_NOTE p_memsz overflow during header update

2014-02-05 Thread Vivek Goyal
On Mon, Feb 03, 2014 at 10:57:58PM +, Pearson, Greg wrote: On 02/03/2014 02:38 PM, Vivek Goyal wrote: On Mon, Feb 03, 2014 at 01:18:38PM -0700, Greg Pearson wrote: [..] diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index 2ca7ba0..051c803 100644 --- a/fs/proc/vmcore.c +++

Re: [PATCH v2] vmcore: prevent PT_NOTE p_memsz overflow during header update

2014-02-03 Thread Pearson, Greg
On 02/03/2014 02:38 PM, Vivek Goyal wrote: > On Mon, Feb 03, 2014 at 01:18:38PM -0700, Greg Pearson wrote: > > [..] >> diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c >> index 2ca7ba0..051c803 100644 >> --- a/fs/proc/vmcore.c >> +++ b/fs/proc/vmcore.c >> @@ -468,12 +468,14 @@ static int __init

Re: [PATCH v2] vmcore: prevent PT_NOTE p_memsz overflow during header update

2014-02-03 Thread Vivek Goyal
On Mon, Feb 03, 2014 at 01:18:38PM -0700, Greg Pearson wrote: [..] > diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c > index 2ca7ba0..051c803 100644 > --- a/fs/proc/vmcore.c > +++ b/fs/proc/vmcore.c > @@ -468,12 +468,14 @@ static int __init update_note_header_size_elf64(const > Elf64_Ehdr

[PATCH v2] vmcore: prevent PT_NOTE p_memsz overflow during header update

2014-02-03 Thread Greg Pearson
Currently, update_note_header_size_elf64() and update_note_header_size_elf32() will add the size of a PT_NOTE entry to real_sz even if that causes real_sz to exceeds max_sz. This patch corrects the while loop logic in those routines to ensure that does not happen and prints a warning if a PT_NOTE

[PATCH v2] vmcore: prevent PT_NOTE p_memsz overflow during header update

2014-02-03 Thread Greg Pearson
Currently, update_note_header_size_elf64() and update_note_header_size_elf32() will add the size of a PT_NOTE entry to real_sz even if that causes real_sz to exceeds max_sz. This patch corrects the while loop logic in those routines to ensure that does not happen and prints a warning if a PT_NOTE

Re: [PATCH v2] vmcore: prevent PT_NOTE p_memsz overflow during header update

2014-02-03 Thread Vivek Goyal
On Mon, Feb 03, 2014 at 01:18:38PM -0700, Greg Pearson wrote: [..] diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index 2ca7ba0..051c803 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c @@ -468,12 +468,14 @@ static int __init update_note_header_size_elf64(const Elf64_Ehdr *ehdr_ptr)

Re: [PATCH v2] vmcore: prevent PT_NOTE p_memsz overflow during header update

2014-02-03 Thread Pearson, Greg
On 02/03/2014 02:38 PM, Vivek Goyal wrote: On Mon, Feb 03, 2014 at 01:18:38PM -0700, Greg Pearson wrote: [..] diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index 2ca7ba0..051c803 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c @@ -468,12 +468,14 @@ static int __init