All of lore.kernel.org
 help / color / mirror / Atom feed
From: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
To: "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH] syscalls/setsockopt09: Add another linux git
Date: Thu, 3 Mar 2022 09:11:29 +0000	[thread overview]
Message-ID: <62208677.4010600@fujitsu.com> (raw)
In-Reply-To: <1646297678-2141-1-git-send-email-xuyang2018.jy@fujitsu.com>

Hi All
> On centos7.9ga, I still hit another crash problem because of use-after-free in
> prb_retire_rx_blk_timer_expired(). Since we free it when timer expired, so this	
Using free is incorrect, should modify as below:
Since we still use the freed resource when timer expired

Best Regards
Yang Xu
> case will crash after we print TPASS info.
> 
> Signed-off-by: Yang Xu<xuyang2018.jy@fujitsu.com>
> ---
>   testcases/kernel/syscalls/setsockopt/setsockopt09.c | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
> 
> diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt09.c b/testcases/kernel/syscalls/setsockopt/setsockopt09.c
> index 2fc66ebbc..62c6dea07 100644
> --- a/testcases/kernel/syscalls/setsockopt/setsockopt09.c
> +++ b/testcases/kernel/syscalls/setsockopt/setsockopt09.c
> @@ -19,6 +19,17 @@
>    *
>    *  net/packet: rx_owner_map depends on pg_vec
>    *
> + * It also triggers another use-after-free problem in
> + * prb_retire_rx_blk_timer_expired.
> + *
> + * Kernel crash fixed in:
> + *
> + * commit c800aaf8d869f2b9b47b10c5c312fe19f0a94042
> + * Author: WANG Cong<xiyou.wangcong@gmail.com>
> + * Date:   Mon Jul 24 10:07:32 2017 -0700
> + *
> + * packet: fix use-after-free in prb_retire_rx_blk_timer_expired()
> + *
>    */
> 
>   #define _GNU_SOURCE
> @@ -110,6 +121,7 @@ static struct tst_test test = {
>   		NULL,
>   	},
>   	.tags = (const struct tst_tag[]) {
> +		{"linux-git", "c800aaf8d869"},
>   		{"linux-git", "ec6af094ea28"},
>   		{"CVE", "2021-22600"},
>   		{}

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-03-03  9:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03  8:54 [LTP] [PATCH] syscalls/setsockopt09: Add another linux git Yang Xu
2022-03-03  9:11 ` xuyang2018.jy [this message]
2022-03-03 14:04 ` Petr Vorel
2022-03-04  3:24   ` xuyang2018.jy
2022-03-04  8:01     ` Petr Vorel
2022-03-08 10:04       ` xuyang2018.jy
2022-03-08 10:44     ` Martin Doucha
2022-03-09  2:03       ` xuyang2018.jy
2022-03-09 10:51         ` Martin Doucha
2022-03-10  6:07           ` xuyang2018.jy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62208677.4010600@fujitsu.com \
    --to=xuyang2018.jy@fujitsu.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.