[DTrace-devel] [PATCH 03/14] Let USDT module names contain dots

Eugene Loh eugene.loh at oracle.com
Fri Jun 7 22:22:46 UTC 2024


On 6/7/24 14:48, Nick Alcock wrote:

> On 4 Jun 2024, Eugene Loh via DTrace-devel stated:
>> 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.

The reason I say the string is of the form "%s:%s:%s:%s" is that we are checking a string returned by make_probespec_name().

I guess I'll turn the check into per-component checks and move them into make_probespec_name().  Incidentally, do your traversal concerns really apply to "."?  I understand "..", but "." seems less criminal.




More information about the DTrace-devel mailing list