From: Nick Alcock <nick.alcock@oracle.com>
To: Eugene Loh via DTrace-devel <dtrace-devel@oss.oracle.com>
Cc: dtrace@lists.linux.dev, Eugene Loh <eugene.loh@oracle.com>
Subject: Re: [DTrace-devel] [PATCH 03/14] Let USDT module names contain dots
Date: Fri, 07 Jun 2024 19:48:05 +0100 [thread overview]
Message-ID: <87v82kmvx6.fsf@esperi.org.uk> (raw)
In-Reply-To: <b3426a7f-c611-4758-a077-5f3aa81bd705@oracle.com> (Eugene Loh via DTrace-devel's message of "Tue, 4 Jun 2024 18:30:49 -0400")
On 4 Jun 2024, Eugene Loh via DTrace-devel stated:
> On 6/4/24 16:42, Kris Van Hees wrote:
>
>> I do not know what to do with this patch. Either it is correct and then the
>> code should not be #if 0 .. #endif, or it is not, and then the patch should
>> not exist.
>
> I was looking for feedback. If we're good with the patch, the "#if 0 / #endif" stuff will be removed in the final version of the
> patch.
>
>> Consider that the tst.dlclose1.sh test has output like this:
>> test/unittest/usdt/tst.dlclose1.sh: Running timeout --signal=TERM 41 test/unittest/usdt/tst.dlclose1.sh /home/kvanhees/dtrace-bpf-user/build/dtrace
>> PASS.
>> started pid 68990
>> ID PROVIDER MODULE FUNCTION NAME
>> 97026 test_prov68990 livelib.so go go
>>
>> So that shows that the module component certain can contain a period (.),
>> so the module component can certainly contain a period (.)
>
> Right.
>
>> whereas we know
>> that the function component cannot. Likewise, provider name cannot contain
>> period as far as I know, nor can the probe name. So, only the module name
>> seems to be an issue.
>
> There are basically two distinct cases here.
>
> In the dof_stash.c case, I note that we are checking a string of the form "%s:%s:%s:%s" to see if it is "." or "..". That simply
> does not make sense. I think the indicated code should be removed.
Yes -- that was a mistake. What we want to ensure is that none of the
probe components *consist solely of* "." or "..". This has to happen
before any attempt is made to write them to the DOF stash, and before
any attempt is made to *look them up* in there, to avoid unintended path
traversal.
This is, I'm afraid, a security issue in the presence of potentially
malicious DOF: we can't just do nothing.
--
NULL && (void)
next prev parent reply other threads:[~2024-06-07 18:48 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-04 18:10 "proof of concept" for systemwide USDT eugene.loh
2024-06-04 18:11 ` [PATCH 01/14] Move comment closer to the code it describes eugene.loh
2024-06-04 18:21 ` [DTrace-devel] " Kris Van Hees
2024-06-04 18:11 ` [PATCH 02/14] Clean up prp/uprp variable names eugene.loh
2024-06-04 18:44 ` [DTrace-devel] " Kris Van Hees
2024-06-05 18:18 ` Eugene Loh
2024-06-04 18:11 ` [PATCH 03/14] Let USDT module names contain dots eugene.loh
2024-06-04 20:42 ` [DTrace-devel] " Kris Van Hees
2024-06-04 22:30 ` Eugene Loh
2024-06-07 18:48 ` Nick Alcock [this message]
2024-06-07 22:22 ` Eugene Loh
2024-06-04 18:11 ` [PATCH 04/14] Track uprobe provider descriptions eugene.loh
2024-06-04 21:10 ` [DTrace-devel] " Kris Van Hees
2024-06-07 21:40 ` Eugene Loh
2024-06-07 22:16 ` Kris Van Hees
2024-06-10 21:23 ` Eugene Loh
2024-06-10 21:31 ` Kris Van Hees
2024-06-04 18:11 ` [PATCH 05/14] Add a hook for a provider-specific "update" function eugene.loh
2024-06-04 21:38 ` [DTrace-devel] " Kris Van Hees
2024-06-10 22:14 ` Eugene Loh
2024-06-04 18:11 ` [PATCH 06/14] Add clauses to per-uprobe list eugene.loh
2024-06-04 18:11 ` [PATCH 07/14] Create the BPF uprobes map eugene.loh
2024-06-05 4:33 ` [DTrace-devel] " Kris Van Hees
2024-06-10 20:55 ` Eugene Loh
2024-06-04 18:11 ` [PATCH 08/14] Use uprobes map to call clauses conditionally eugene.loh
2024-06-04 18:11 ` [PATCH 09/14] Systemwide USDT WIP eugene.loh
2024-06-04 18:11 ` [PATCH 10/14] Fix the consumer's picture of the EPID eugene.loh
2024-06-04 18:11 ` [PATCH 11/14] Back out the previous patch eugene.loh
2024-06-04 18:11 ` [PATCH 12/14] Fix comments that hardwire DBUF_ offsets eugene.loh
2024-06-04 18:11 ` [PATCH 13/14] Clean up some comments eugene.loh
2024-06-04 18:11 ` [PATCH 14/14] Have the consumer get the PRID from the output buffer eugene.loh
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=87v82kmvx6.fsf@esperi.org.uk \
--to=nick.alcock@oracle.com \
--cc=dtrace-devel@oss.oracle.com \
--cc=dtrace@lists.linux.dev \
--cc=eugene.loh@oracle.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