{
  "id": 2886257,
  "title": "X86_64 From Source Code to Binary: What Does GCC Actually Do ? DEP / NX",
  "url": "https://urgent.news/2026/08/23/x86-64-from-source-code-to-binary-what-does-gcc-actually-do-dep-nx",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-23T22:44:04.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ddupard/x8664-from-source-code-to-binary-what-does-gcc-actually-do-dep-nx-1be7"
  },
  "original_language": "en",
  "account": "The C program provided illustrates a stack-based buffer overflow vulnerability. The function `handle_client` receives data from a client, then copies the entire incoming request (which can be up to 256 bytes) into a buffer that can only hold 64 bytes. This overwrites adjacent memory, including the saved return address on the stack.\n\nThe vulnerability arises due to the use of the `strcpy()` function, which does not perform bounds checking. If the `request` string is longer than 64 bytes, it will overflow the `buffer` array and overwrite critical data on the stack, such as the saved return address. This can potentially allow an attacker to redirect the program's control flow to malicious code of their choosing.",
  "summary": "Having explained how GCC options like -fstack-protector works in my preceding article , it's time to explain how to set the stack non executable and what does that mean. To illustrate this, I will use the following program : #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <arpa/inet.h> #define PORT 8080 #define BUFFER_SIZE 64 #define _NOTEST #ifndef _NOTEST…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}