Zum Hauptinhalt springen
LIVE
CVSS 8.7CVE-2026-138346 | In Y Soft SAFEQ Cloud PC Client for Windows and macOS before 2026.09.03.4, under specific conditions, an attacker who already has access to a workstation running the PC Client, and who has specific knowledge of the customer's environment and the targeted workstation, could access files on another workstation running the PC Client within the same organization, including locally stored print jobs (local storage or hybrid mode). Access from outside the customerCVSS 9.4CVE-2026-138199 | A vulnerability was found in D-Link DIR-629 1.03.B01 CN. This affects the function dhcps4start of the file /etc/services/DHCPS/dhcpserver.php of the component DHCP Server. The manipulation of the argument domain results in os command injection. The attack may be performed from remote. The exploit has been made public and could be used.CVSS 5.3CVE-2026-138170 | A security flaw has been discovered in itsourcecode Event Management System 1.0. This issue affects some unknown processing of the file /admin/view_event.php. Performing a manipulation of the argument ID results in sql injection. The attack may be initiated remotely. The exploit has been released to the public and may be used for attacks.CVSS 5.1CVE-2026-138169 | A vulnerability was identified in itsourcecode Insurance Management System 1.0. This vulnerability affects unknown code of the file updateNominee.php. Such manipulation of the argument nominee_id leads to sql injection. The attack can be launched remotely. The exploit is publicly available and might be used.CVSS 5.3CVE-2026-138168 | A vulnerability was determined in itsourcecode Insurance Management System 1.0. This affects an unknown part of the file updateClient.php. This manipulation of the argument client_id causes sql injection. The attack can be initiated remotely. The exploit has been publicly disclosed and may be utilized.CVSS 4.8CVE-2026-138167 | A vulnerability was found in OpenHands software-agent-sdk up to 1.64.1. Affected by this issue is the function FileSettingsStore.load of the file openhands/agent_server/persistence/store.py of the component agent_server. The manipulation results in incorrect authorization. Attacking locally is a requirement. The exploit has been made public and could be used.CVSS 6.9CVE-2026-138166 | A vulnerability has been found in wxiaoqi Spring-Cloud-Platform up to 3.0. Affected by this vulnerability is the function RsaKeyHelper.generateKey of the file ace-modules/ace-admin/src/main/resources/application.yml of the component JWT Authentication. The manipulation of the argument rsa-secret leads to use of hard-coded cryptographic key . It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used. The proCVSS 10.0CVE-2026-138165 | A flaw has been found in D-Link R15 up to 1.22. Affected is an unknown function of the file /flupl/nodered of the component Upload Handler. Executing a manipulation of the argument filename can lead to os command injection. The attack may be performed from remote. The exploit has been published and may be used.
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

From Source Code to Binary: What Does GCC Actually Do?

When we write a C program, we work with high-level concepts like functions, variables, and loops. However, your computer's processor only understands raw…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Quelle & Fakten · 6 Min. Lesezeit
Quelle: dev.to
Rubrik: Programación segura

When we write a C program, we work with high-level concepts like functions, variables, and loops. However, your computer's processor only understands raw binary instructions. The compiler, gcc (GNU Compiler Collection), acts as a universal translator, transforming your human-readable code into machine-executable logic.



To illustrate this, we use a simple program:




#include <stdio.h>

int main() {
printf("Hello world\n") ;
printf("multiple parameters %s %i %i\n","test",1,2) ;
}









1. The Invisible Compilation Journey



gcc is not just a single tool; it is an orchestrator that runs several sequential stages:



The Preprocessor: It handles directives like #include . It replaces this line with the entire content of the header file, preparing the code for compilation.



Compilation: The C code is transformed into assembly language, which is a textual representation of machine instructions.



Assembly: The assembler translates these instructions into binary format (object files .o).



Linking: This is the crucial final step. Your code uses printf, a function belonging to the standard C library (libc). The linker connects your code to the actual addresses of these functions within the system library.






2. Anatomy of a Binary: From Source to Execution



After the linking process, gcc generates an ELF File which contains several sections and several compiler-generated functions






A. Binary Sections: The Anatomy of the ELF File





  • .init & .fini: These sections contain code executed before and after your main function. They handle global setup and teardown.

  • .plt (Procedure Linkage Table): This section acts as a "trampoline" for external library functions (like printf). Since the exact memory address of libc is determined at runtime, the .plt enables dynamic linking.


  • .text: This is where your actual code—the main function and compiler-generated support functions—resides. It is marked as Read-Only and Executable to prevent tampering.







B. Compiler-Generated Functions



gcc adds several functions to your binary that you never explicitly wrote. These are essential for the program's lifecycle:





  • _start: This is the real entry point of your program. It is called by the OS kernel. It initializes the environment (arguments, environment variables) and then calls __libc_start_main.


  • __libc_start_main: A standard library function that prepares the environment for your main function and calls it


  • register_tm_clones / deregister_tm_clones: These functions handle Transactional Memory management. They are part of the GCC runtime overhead.


  • __do_global_dtors_aux: This function is responsible for calling destructors for global objects before the program exits.


  • frame_dummy: A helper function used to register frame information for exception handling.






C. Execution Flow: What Happens When You Run ./hello?



When you launch the program from your shell, the following sequence occurs:



a. OS Kernel Loading: The Linux kernel maps the binary into memory and hands control to the dynamic linker (ld-linux.so).

b. _start: The kernel jumps to _start. It cleans up the stack, sets up the initial registers, and invokes the C library's initialization logic.

c. Initialization (.init): The code in the .init section runs, setting up the runtime environment.

d. main Invocation: __libc_start_main calls your main function.

e. printf Execution: Inside main, your code calls printf. It jumps to the .plt entry, which resolves the library address and executes the actual print command.

f. Termination: After main returns, the program invokes __do_global_dtors_aux (to clean up globals) and the .fini section, then exits by calling a kernel system call.





Summary Table





































Stage Function/Section Responsibility
Setup _start Prepare registers and invoke libc
Init .init Global initializations
Logic main Your custom code
Linkage .plt Resolving library functions (printf)
Cleanup .fini Final program shutdown




3. The Mechanics of Parameter Passing (System V AMD64 ABI Convention)



In the C programming language, passing arguments between functions does not rely on a "magic" stack, but on a strict convention called the System V AMD64 ABI. To optimize for speed, the gcc compiler prioritizes using CPU registers before resorting to memory (the stack).



When a function is called, the parameters are placed in the following specific registers, in this exact order:



rdi: 1st argument

rsi: 2nd argument

rdx: 3rd argument

rcx: 4th argument

r8: 5th argument

r9: 6th argument



If your function requires more than 6 arguments, the additional parameters are then pushed onto the stack, which is significantly slower.



See below for some examples of the System V AMD64 ABI mechanism



In the objdump analysis of the main function, you could observe this sequence:




0000000000401156 <main>:
401156: f3 0f 1e fa endbr64
40115a: 55 push %rbp
40115b: 48 89 e5 mov %rsp,%rbp
40115e: 48 8d 05 9f 0e 00 00 lea 0xe9f(%rip),%rax # 402004 <_IO_stdin_used+0x4>
401165: 48 89 c7 mov %rax,%rdi
401168: e8 e3 fe ff ff call 401050 <puts@plt>
40116d: b9 02 00 00 00 mov $0x2,%ecx
401172: ba 01 00 00 00 mov $0x1,%edx
401177: 48 8d 05 92 0e 00 00 lea 0xe92(%rip),%rax # 402010 <_IO_stdin_used+0x10>
40117e: 48 89 c6 mov %rax,%rsi
401181: 48 8d 05 8d 0e 00 00 lea 0xe8d(%rip),%rax # 402015 <_IO_stdin_used+0x15>
401188: 48 89 c7 mov %rax,%rdi
40118b: b8 00 00 00 00 mov $0x0,%eax
401190: e8 cb fe ff ff call 401060 <printf@plt>
401195: b8 00 00 00 00 mov $0x0,%eax
40119a: 5d pop %rbp
40119b: c3 ret






One of the most interesting aspects revealed by disassembly is GCC's optimization logic. For the simple string 'Hello world\n', the compiler identifies that no formatting is required and replaces the call to the more complex printf with a call to the more efficient puts function. This demonstrates that GCC is not just a translator, but an optimizer that actively refines your code for better performance.



For the first instruction the compiler fills the register rdi.



When calling the second printf, we can observe the compiler strictly adhering to the System V ABI. It populates the registers in the following order:



rdi: Holds the address of the format string.

rsi: Holds the address of the string argument 'test'.

rdx: Holds the first integer (1).

rcx: Holds the second integer (2).



By analyzing the assembly, we see exactly how the compiler maps your C variables to the CPU's 'highways'."






4. Epilogue



In this very short article we explained what gcc does when it compiles a C source code.

By disassembling your own code (with objdump), you precisely see what gcc creates during the compilation process. gcc adds control code (prologues/epilogues) and linking mechanisms (.plt, .got) that are essential for your program to communicate with the operating system. Moreover it follows a strict mechanism for passing arguments.

Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Gäste-Hinweise werden kurz redaktionell geprüft und danach hier angezeigt.

Community-Hinweise zur Meldung

0 freigegeben
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:

💬 Debate de la comunidad y comentarios

🌐 Unirse al chat principal

Inicia el debate en el stream de difusión del Social Chat o envía arriba una contribución experta mediante el formulario de ampliación.

Valoración de la comunidad &amp; prueba social
⭐ Valoración de los lectores
–
Ø / 5.0
Aún no hay valoraciones de lectores
¿Le ha resultado útil este artículo?
0
Dejar una valoración ahora
Valoración detallada (opcional)
Contenido & calidad
Fuente & credibilidad
Actualidad
Briefing de seguridad Gratis · baja en 1 clic

Intelligence Digest — gratis

Cada día las noticias de seguridad más importantes · baja en cualquier momento

Clústeres de historias relacionados & fuentes (IA vectorial)

6 Cluster
18 fuentes
CVE-2026-135539 | Mozilla Firefox up to 115.45/153.7/160 CSS Object Model use after free (Nessus ID 388625)
VulDB Updates hace 2 h
17 fuentes más
VulDB Updateshace 2 hCVE-2026-135541 | Mozilla Firefox up to 115.45/153.7/160 XSLT use after free (Nessus ID 388625) VulDB Updateshace 2 hCVE-2026-135547 | Mozilla Firefox up to 115.45/153.7/160 Networking sandbox (Nessus ID 388625) VulDB Updateshace 2 hCVE-2026-135549 | Mozilla Firefox up to 115.45/153.7/160 XSLT use after free (Nessus ID 388625) VulDB Updateshace 2 hCVE-2026-135548 | Mozilla Firefox up to 115.45/153.7/160 Layout use after free (Nessus ID 388625) VulDB Updateshace 3 hCVE-2026-135533 | Mozilla Firefox up to 115.45/153.7/160 Layout Tables off-by-one (Nessus ID 388625) VulDB Updateshace 3 hCVE-2026-135536 | Mozilla Firefox up to 115.45/153.7/160 DOM Editor uninitialized pointer (Nessus ID 388625) VulDB Updateshace 3 hCVE-2026-135535 | Mozilla Firefox up to 115.45/153.7/160 Skia input validation (Nessus ID 388625) VulDB Updateshace 3 hCVE-2026-135537 | Mozilla Firefox up to 115.45/153.7/160 Layout Text/Fonts out-of-bounds (Nessus ID 388625) VulDB Updateshace 3 hCVE-2026-135525 | Mozilla Firefox up to 115.45/153.7/160 WebRender use after free (Nessus ID 388625) VulDB Updateshace 3 hCVE-2026-135526 | Mozilla Firefox up to 115.45/153.7/160 Networking use after free (Nessus ID 388625) VulDB Updateshace 3 hCVE-2026-135527 | Mozilla Firefox up to 115.45/153.7/160 DOM/HTML use after free (Nessus ID 388625) VulDB Updateshace 3 hCVE-2026-135528 | Mozilla Firefox up to 153.7/160 HTTP race condition (Nessus ID 388625) VulDB Updateshace 3 hCVE-2026-135530 | Mozilla Firefox up to 115.45/153.7/160 HTTP sandbox (Nessus ID 388625) VulDB Updateshace 3 hCVE-2026-135529 | Mozilla Firefox up to 153.7/160 Text sandbox (Nessus ID 388625) VulDB Updateshace 4 hCVE-2026-135520 | Mozilla Firefox up to 115.45/153.7/160 CanvasWebGL sandbox (Nessus ID 388625) VulDB Updateshace 4 hCVE-2026-135524 | Mozilla Firefox JavaScript Engine use after free (Nessus ID 388625) VulDB Updateshace 4 hCVE-2026-135521 | Mozilla Firefox up to 115.45/153.7/160 Navigation sandbox (Nessus ID 388625)
16 fuentes
CVE-2026-116159 | ImageMagick up to 6.9.13-57/7.1.2-32 CDL Option memory leak (Nessus ID 388637)
VulDB Updates hace 23 min.
15 fuentes más
VulDB Updateshace 23 min.CVE-2026-116154 | ImageMagick up to 6.9.13-57/7.1.2-32 XML Parser memory leak (Nessus ID 388637) VulDB Updateshace 1 hCVE-2026-72264 | Linux Kernel up to 7.1.4 tridentfb trident_pci_probe memory leak (WID-SEC-2026-2852) VulDB Updateshace 1 hCVE-2026-72263 | Linux Kernel up to 7.1.4 ASoC snd_sof_load_topology memory leak (WID-SEC-2026-2852) VulDB Updateshace 1 hCVE-2026-72265 | Linux Kernel up to 7.1.4 fbdev nvidiafb_probe memory leak (WID-SEC-2026-2852) VulDB Updateshace 1 hCVE-2026-72266 | Linux Kernel up to 6.6.144/6.12.96/6.18.39/7.1.4 vesafb vesafb_probe memory leak (WID-SEC-2026-2852) VulDB Updateshace 1 hCVE-2026-72267 | Linux Kernel up to 7.1.4 carminefb alloc_carmine_fb memory leak (WID-SEC-2026-2852) VulDB Updateshace 1 hCVE-2026-72269 | Linux Kernel up to 7.1.4 fbdev uvesafb_probe memory leak (WID-SEC-2026-2852) VulDB Updateshace 1 hCVE-2026-72268 | Linux Kernel up to 7.1.4 fbdev tdfxfb_probe memory leak (WID-SEC-2026-2852) VulDB Updateshace 1 hCVE-2026-72271 | Linux Kernel up to 7.1.4 i740fb i740fb_probe memory leak (WID-SEC-2026-2852) VulDB Updateshace 1 hCVE-2026-72270 | Linux Kernel up to 7.1.4 fbdev s3_pci_probe memory leak (WID-SEC-2026-2852) VulDB Updateshace 1 hCVE-2026-72272 | Linux Kernel up to 7.1.4 fbdev/radeon radeonfb_pci_register memory leak (WID-SEC-2026-2852) VulDB Updateshace 2 hCVE-2026-135540 | Mozilla Firefox up to 115.45/153.7/160 JIT memory corruption (Nessus ID 388625) VulDB Updateshace 2 hCVE-2026-135544 | Mozilla Firefox up to 115.45/153.7/160 Navigation memory corruption (Nessus ID 388625) VulDB Updateshace 2 hCVE-2026-135545 | Mozilla Firefox up to 153.7/160 Editor memory corruption (Nessus ID 388625) VulDB Updateshace 2 hCVE-2026-135543 | Mozilla Firefox up to 115.45/153.7/160 Networking memory corruption (Nessus ID 388625)
15 fuentes
Garmin fenix 8 47mm drops $250 to $749.99 for Cyber Monday, $49 under Ultra 4
The Mac Observer hace 31 min.
14 fuentes más
Latest from TechRadarhace 51 min.I've been waiting for a better deal on the Philips LatteGo 4400 — and Amazon has delivered a record-low price for Cyber Monday Latest from TechRadarhace 1 hLooking to get a last-minute gaming gift before Cyber Monday is over? Latest from Windows Centralhace 2 hWhy I bought a handheld over a gaming laptop on Cyber Monday Latest from TechRadarhace 2 hI found the most capable PC under $300 for Cyber Monday — Origimagic's C7 Windows 11 Pro machine packs dual Thunderbolt 4, 2.5Gb LAN, a Core 3 100U, 16GB of RAM, and a 512GB SSD OS X Dailyhace 2 hCyber Monday Deals: $300 Off 16″ PROLED MacBook Pro, $100 Off AirPods Pro 3, $100 Off iPad Air, & More Latest from TechRadarhace 2 hThe best Cyber Monday deals in the UK in 2026: top picks from Amazon, Argos, Ninja, Lego and more Latest from TechRadarhace 3 hCyber Monday Australia laptop deals for 2026: score up to 52% off Lenovo, Apple, Dell, HP and more Latest from TechRadarhace 3 hAmazon Australia Cyber Monday deals CNEThace 3 hThis Pocket Battery Recharges Your Phone 4 Times, and it’s Only $38 for Cyber Monday Latest from TechRadarhace 4 hFirebat's M1 is a cracking Ryzen AI 9 HX 470 mini PC for AI workloads — and it's packing OCuLink, 32GB of RAM, and a 1TB SSD for $1020 this Cyber Monday Latest from TechRadarhace 4 hThe Lenovo IdeaCentre Tower Copilot+ PC with Core Ultra 7 CPU isn't discounted for Cyber Monday — and it's still the desktop computer I'd buy for work for $1049 The Vergehace 4 hQobuz is my streaming service of choice and it’s on sale during Cyber Monday CNEThace 12 díasThis Paramount Plus Cyber Monday Deal Gets You Ad-Free Viewing for Only $3 Per Month CNEThace 4 hCyber Monday Meta Quest 3S Deal Knocks $53 Off and Gets You $50 Free Amazon Credit
12 fuentes
CVE-2026-72260 | Linux Kernel up to 6.6.147/6.12.100/6.18.39/7.1.4 ASoC mediatek mt8192 pm_runtime_get_sync unusual condition (WID-SEC-2026-2852)
VulDB Updates hace 1 h
11 fuentes más
Artículos similares
🔍 Verwandte News

Auch interessante Nachrichten From Source Code to Binary: What Does GCC Actually Do?

Thematisch verwandte Begriffe: From, Source, Code, Binary · 6 Treffer

Laden...

Cargando artículos ...

Laden...

Cargando vídeos ...

Laden...

Cargando artículos ...

Laden...

Cargando vídeos ...

Laden...

Cargando artículos ...

Laden...

Cargando vídeos ...

Laden...

Cargando artículos ...

Laden...

Cargando vídeos ...

💬 Cargando comentarios…
Desliza para actualizar
Widgets & temas
Cargando widgets…
Siguiente entrada