Linux system errors

Bad Address

14
MediumLinux System

Reviewed for reference consistency: August 11, 2026

the kernel could not reach the user-space buffer a syscall pointed at

What 14 Means

The 14 error on the Linux system errors indicates bad address — the kernel could not reach the user-space buffer a syscall pointed at. This typically occurs due to an uninitialized or garbage pointer passed as a syscall argument.

Exit code 14 corresponds to EFAULT, 'Bad address'. Despite the name, nothing is wrong with anyone's RAM. The setting is the boundary between kernel and user space: a syscall was handed a pointer to a user-space buffer, and when the kernel reached across to read or write it, the memory was not there. The kernel refuses the access and reports errno 14 instead of crashing the process.

How to fix 14

General informational guidance, not professional advice. Commands can affect your system or data — back up first and proceed at your own risk. FixerCode is an independent reference, not affiliated with any vendor mentioned.

  1. Find the failing call and its arguments

    The syscall trace shows each call's pointer arguments; the one returning EFAULT names the culprit interface.

    strace -o trace.log ./your_program || grep -i fault trace.log
  2. Trace the bad address to its origin

    Instrumenting the run traces the bogus pointer back to the statement that produced it, separating uninitialized arguments from structure-layout drift.

    valgrind ./your_program

Technical Background

EFAULT happens at the boundary. A syscall's pointer arguments name buffers in user space, and the kernel copies data across that line in both directions — paths into the kernel, results out. When a pointer names memory the process does not actually have mapped, the copy fails, and the designed response is errno 14: the request is refused, the process lives to pass a better pointer.

The usual suspects are uninitialized arguments and layout drift. An uninitialized pointer is simply garbage handed to the kernel. Layout drift is subtler: a structure compiled with different padding or a missing field shifts where the kernel expects to read, and the access lands beyond the mapping the caller provided.

Language boundaries are fertile ground. FFI bridges and hand-written syscall wrappers must reproduce the exact memory layout the kernel expects, and EFAULT is frequently the first symptom that a marshalling rule got lost in translation.

Common Causes

  • An uninitialized or garbage pointer passed as a syscall argument
  • A buffer address outside the process's valid mappings
  • A structure size or layout mismatch leaving a syscall reading past valid memory

Typical Scenarios

  • A C program passing an uninitialized pointer as a read() or stat() buffer
  • A foreign-function interface marshalling arguments incorrectly so a syscall receives a bogus address
  • A hand-rolled structure whose size mismatches what the kernel expects, pushing the access past the mapping

What to Know

A syscall trace isolates the failing call and its arguments, which usually exposes the bad pointer directly. When layout drift is the cause, instrumentation pinpoints the statement that handed the kernel the dead address.

Frequently Asked Questions

Common questions about Linux 14 error

No. The name misleads: the fault is an unreachable user-space address passed to a syscall, not defective RAM. Hardware memory problems surface differently — as SIGSEGV or machine-check events, not as tidy errno 14 returns.

9 (EBADF) means the descriptor handle is unknown; 14 (EFAULT) means the handle was fine but the buffer behind the syscall's pointer argument could not be reached. Handle versus address.

Because the address arrived as an argument, not as an executed instruction. The kernel validates syscall-pointed buffers and returns EFAULT, reserving SIGSEGV for faults in the program's own execution.

Related Error Codes

Related Errors From Other Categories

Similar error codes documented across different platforms and systems