All lessons Leer en español

Security in depth · Unit 22 · Lesson 11 of 44

Search paths are trust decisions

Explain what an explicit dependency location proves and what it leaves unresolved.

4 minreadyShort lesson

Helpful before thisLinux privilege escalation

See all lessons in this topic

After this lesson you can

  • Separate dependency selection from evidence of its origin and change authority.

One idea. One situation. One reasoned decision.

How it works

Some Linux program-launch interfaces search PATH when given a program name without a slash. A supplied pathname avoids that search. This distinction identifies how a program is selected; it does not authenticate the program or establish who can change it.

Different launchers and language runtimes can use different resolution rules. Identify the mechanism before interpreting a search list.

Search context → Selected dependency → Change authoritySearch contextSelected dependencyChange authority
A precise selection still requires evidence about the selected dependency and its maintenance.

Read the supplied record

P1 describes a fictional report service using a documented ordered program search.

Record Supplied value
Requested helper name summary-format
First searched location Managed Tools; eligible matching copy exists
Second searched location Team Workspace; eligible matching copy exists
Approved proposal Use Managed Tools explicitly
Missing evidence Current release verification and change permissions

Assume this is a fresh lookup, both copies are eligible, the first launches successfully, and no alias or other resolver changes the result. Managed Tools is selected under the supplied order.

The proposed explicit location removes dependence on that search order. It does not fill the missing integrity and maintenance evidence. The directory’s reassuring name is not proof of controlled updates.

Ask the maintainer to associate the selected object with the reviewed release and document who can change the file and its containing location. Keep this separate from evidence about any libraries or configuration the helper later loads.

The packet supports a selection decision and an incomplete trust review. It does not establish that either copy is malicious or that an unintended program actually ran.

The key distinction: Knowing where code comes from is different from knowing why to trust it.

Check yourself

No timer. No penalties. Read the explanation and try again whenever you like.

  1. What does replacing P1’s search with the explicit Managed Tools location establish?

    Show the answer

    Correct answer: It fixes the intended location, while integrity and change-control evidence still need review. Removing search ambiguity does not authenticate the selected file or establish who can change it and its containing location.

Try it

  • WriteWrite three sentences for P1: which copy is selected, what an explicit location changes, and which ownership or integrity evidence is still missing before acceptance.
References