nerdexam
CompTIA

CAS-001 · Question #412

Joe, a hacker, has discovered he can specifically craft a webpage that when viewed in a browser crashes the browser and then allows him to gain remote code execution in the context of the victim's…

The correct answer is E. Use after free. A 'Use After Free' (UAF) vulnerability occurs when a program frees (deallocates) a block of heap memory but retains a pointer to that memory and later attempts to use it. The freed memory is 'unused' from the allocator's perspective, but the dangling pointer still references…

Enterprise Security

Question

Joe, a hacker, has discovered he can specifically craft a webpage that when viewed in a browser crashes the browser and then allows him to gain remote code execution in the context of the victim's privilege level. The browser crashes due to an exception error when a heap memory that is unused is accessed. Which of the following BEST describes the application issue?

Options

  • AInteger overflow
  • BClick-jacking
  • CRace condition
  • DSQL injection
  • EUse after free
  • FInput validation

How the community answered

(51 responses)
  • A
    2% (1)
  • B
    10% (5)
  • D
    22% (11)
  • E
    61% (31)
  • F
    6% (3)

Explanation

A 'Use After Free' (UAF) vulnerability occurs when a program frees (deallocates) a block of heap memory but retains a pointer to that memory and later attempts to use it. The freed memory is 'unused' from the allocator's perspective, but the dangling pointer still references it. When the program dereferences this stale pointer, it triggers an access violation or exception-crashing the application. Attackers exploit UAF by allocating controlled data into the freed memory region before the vulnerable code re-accesses it, redirecting execution flow to achieve remote code execution. This matches the scenario precisely: heap memory that is 'unused' (freed) is accessed, causing a crash that can be weaponized. Integer overflow (A) involves arithmetic boundary errors. Clickjacking (B) is a UI deception attack. Race condition (C) involves timing between threads/processes. SQL injection (D) targets databases. Input validation (F) is a general defense category, not a vulnerability type.

Topics

#use-after-free#heap memory corruption#remote code execution#browser vulnerability

Community Discussion

No community discussion yet for this question.

Full CAS-001 Practice