Security+ SY0-701 practice question 27 of 35

During a SQL update of a database, a temporary field that was created was replaced by an attacker in order to allow access to the system. Which of the following best describes this type of vulnerability?

Full set: 923 questions
Answer options
A: Race condition Correct answer
B: Memory injection
C: Malicious update
D: Side loading
Correct Answer:
A. Race condition
Explanation

This scenario describes a Time-of-Check to Time-of-Use (TOCTOU) vulnerability, which is a specific type of race condition. The system's secure operation depends on the sequence of events. Here, the system creates a temporary field (the "check" or setup phase), but a window of time exists before that field is used for its intended purpose (the "use" phase). An attacker exploits this window to replace the field with a malicious one, altering the outcome of the operation to gain access.

Why Incorrect

Memory injection involves writing malicious code to a process's memory, which is a different mechanism than exploiting a timing gap in a sequence of operations. Malicious update is a generic description of the attack's outcome, not the specific type of software vulnerability that was exploited. Side loading refers to installing applications from unofficial sources, typically on mobile devices, and is unrelated to database transaction vulnerabilities.

References

1. The MITRE Corporation. (2023). CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition. Common Weakness Enumeration. Retrieved from https://cwe.mitre.org/data/definitions/367.html. This source defines the vulnerability as occurring when a resource is checked

but its state can change before it is used

as described in the question.

2. Bishop

M.

& Dilger

M. (1996). Checking for race conditions in file accesses. Computing systems

9(2)

131-152. This foundational academic paper explains the concept of TOCTOU race conditions

particularly in the context of file systems

where a temporary file's state can be altered between creation and use.

3. Dowd

M.

McDonald

J.

& Schuh

J. (2006). The Art of Software Security Assessment: Identifying and Preventing Software Vulnerabilities. Addison-Wesley Professional. Chapter 9

"Race Conditions

" provides a detailed analysis of TOCTOU vulnerabilities

including examples in database and file operations.

Scroll to Top