Error Codes Wiki

Linux Error EFAULT (errno 14) — Bad Address Fix

Warninglinux errno

Overview

Linux errno 14 EFAULT means a system call received an invalid memory address (bad pointer).

Key Details

  • Error: EFAULT (errno 14)
  • Message: Bad address
  • System call received an invalid pointer
  • Programming error — null or freed pointer

Common Causes

  • Passing NULL pointer to system call
  • Using freed memory (use-after-free)
  • Buffer overflow corrupted a pointer
  • Stack corruption from recursion overflow

Steps

  1. 1Check for NULL pointers before system calls
  2. 2Use Valgrind to detect memory errors
  3. 3Enable AddressSanitizer: gcc -fsanitize=address
  4. 4Review code for use-after-free bugs
  5. 5Check stack size with ulimit -s

Tags

linuxlinux-errnolinux errno 14ubuntuterminal

More in Linux Errno

Frequently Asked Questions

Yes — it indicates a programming error in memory handling.