GATE / CS ARCHIVE

GATE CSE 2002 / QUESTION 2.20

Dynamic-library search risks

Operating Systems · Processes, Threads & System Calls · Full GATE CSE 2002 paper

GATE 2002, Q2.20 2 marks · MCQ
Report issue

Processes, Threads & System Calls

Question 2.20, GATE 2002: Why can dynamic linking raise security concerns?
(A) Security is dynamic.
(B) The search path for dynamic libraries is not known until runtime.
(C) Linking is insecure.
(D) Cryptographic procedures are unavailable for dynamic linking.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Step 1: Describe the actual attack surface.

Step 2: A loader may search directories in an order influenced by environment variables, configuration or application location. If an attacker can place a library earlier in that search, the program may execute unintended code under its privileges. Restricting search paths and validating loaded libraries addresses this risk. The problem is runtime resolution policy, not an intrinsic absence of cryptographic techniques.

Conclusion: Dynamic linking may resolve library paths at runtime. If untrusted directories or mutable search-path settings influence resolution, an unintended library can be loaded. This is the security concern described by B, not a claim that every dynamic-linking configuration is insecure or that cryptography is unavailable.

Original paper, page 5