From: "Lin Ma" <linma@zju.edu.cn>
To: "Jamal Hadi Salim" <jhs@mojatatu.com>
Cc: xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v1] net/sched: cls_api: complement tcf_tfilter_dump_policy
Date: Thu, 28 Dec 2023 10:09:06 +0800 (GMT+08:00) [thread overview]
Message-ID: <1869ff03.57bb7.18cae2eb8ad.Coremail.linma@zju.edu.cn> (raw)
In-Reply-To: <CAM0EoMm5ruiBfJC1C+Jvz=vuKz03e_KOS_jgbS7ETkSfV-SKDA@mail.gmail.com>
Hello Jamal,
> >
> > Sorry, still trying to follow your reasoning that this is a "net issue":
> > As you point out, the skb will have enough space to carry the 32 bit
> > value. Worst case is we read garbage. And the dump, using this garbage
> > chain index, will not find the chain or will find some unintended
> > chain. Am i missing something?
Thanks for your replying.
I investigated the code and yes, as you said, the skb data will carry
a tailing space used for putting `struct skb_shared_info`. Hence, 32
bit is not enough here to conduct an overflow read to next object.
Hence I guess you have not missed anything but I do. For the
CVE-2023-3773, the read value is dumped to user-space so the leak is
direct. But since the chain index is not directly dumped
into userspace. The attacker can only exploit this via a side-channel
manner. Assuming the attacker could create as many chain as he can
(2**32 maybe ;P), then the dump from the garbage chain index will leak
the kernel data indirectly.
> >
> > Can you send me a repro (privately) that actually causes the "heap
> > data leak" if you have one?
>
> To clarify what triggered me is your tie of this as an exploit and
> quoting CVEs. Maybe not so much net vs net-next.
There may be a misunderstanding here. I didn't write such a side-channel
exploit here and as you point out, this is not an easy and worthy task.
(but If you are asking the exploit for CVE-2023-3773, I will inform you
when it is send to oss-security)
Anyway, I believe you are right. Given the fact that I ignore the
difficulty of this exploitation, such a bug rather than a vulnerability
should go to net-next instead of net.
Shall I add any tag from you like Suggested or Reviewed?
> cheers,
> jamal
>
Thanks
Lin
prev parent reply other threads:[~2023-12-28 2:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-24 16:54 [PATCH net v1] net/sched: cls_api: complement tcf_tfilter_dump_policy Lin Ma
2023-12-25 23:04 ` Jamal Hadi Salim
2023-12-26 1:39 ` Lin Ma
2023-12-27 17:02 ` Jamal Hadi Salim
2023-12-27 17:33 ` Jamal Hadi Salim
2023-12-28 2:09 ` Lin Ma [this message]
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=1869ff03.57bb7.18cae2eb8ad.Coremail.linma@zju.edu.cn \
--to=linma@zju.edu.cn \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=xiyou.wangcong@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).