[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180106195340.4ffa4bfd@elisabeth>
Date: Sat, 6 Jan 2018 19:53:40 +0100
From: Stefano Brivio <sbrivio@...hat.com>
To: Antonio Quartulli <a@...table.cc>
Cc: netdev@...r.kernel.org,
Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [iproute2 1/2] ss: fix crash when skipping disabled header
field
On Sun, 7 Jan 2018 02:31:49 +0800
Antonio Quartulli <a@...table.cc> wrote:
> When the first header field is disabled (i.e. when passing the -t
> option), field_flush() is invoked with the `buffer` global variable
> still zero'd.
> However, in field_flush() we try to access buffer.cur->len
> during variables initialization, thus leading to a SIGSEGV.
Good catch, thanks for fixing this.
> It's interesting to note that this bug appears only when the code
> is compiled with -O0, because the compiler is smart
> enough to immediately jump to the return statement if optimizations
> are enabled and skip the faulty instruction.
I should really have tested all the options with -O0 as well. :( Done
now.
> Cc: Stefano Brivio <sbrivio@...hat.com>
> Cc: Stephen Hemminger <stephen@...workplumber.org>
> Signed-off-by: Antonio Quartulli <a@...table.cc>
Fixes: 691bd854bf4a ("ss: Buffer raw fields first, then render them as a table")
Reviewed-by: Stefano Brivio <sbrivio@...hat.com>
--
Stefano
Powered by blists - more mailing lists