From 0ac7f33718fec57815d5e28408b401d93924fee2 Mon Sep 17 00:00:00 2001 From: Joseph Lee Date: Tue, 18 Aug 2026 22:24:33 +0900 Subject: [PATCH] nano_attachment: fix crash when the configuration is loaded A stray comma between two adjacent string literals ended the configuration log's format string one part early, so "async mode: %u" was passed as the first variadic argument instead of being concatenated onto the format. That shifted every argument by one: the %s for the failure mode received the debug level instead, and printf dereferenced that integer as a pointer. The attachment died of SIGSEGV inside vsnprintf as soon as the agent connected and configuration first loaded, so it never finished registering. With the debug level at 2, the pointer it walked was 0x2: #1 strnlen (s=0x2 ) #2 printf_core (fmt="Successfully loaded configuration. inspection mode: ...") #5 write_dbg_impl #6 init_attachment_config #8 InitNanoAttachment Co-Authored-By: Claude Fable 5 --- attachments/nano_attachment/nano_configuration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attachments/nano_attachment/nano_configuration.c b/attachments/nano_attachment/nano_configuration.c index 7a89bfa..8bb3b97 100644 --- a/attachments/nano_attachment/nano_configuration.c +++ b/attachments/nano_attachment/nano_configuration.c @@ -114,7 +114,7 @@ init_attachment_config(NanoAttachment *attachment, const char *conf_path) "static resources path: %s, " "num of nginx ipc elements: %u, " "keep alive interval msec: %u msec, " - "paired affinity enabled: %u", + "paired affinity enabled: %u, " "async mode: %u", attachment->inspection_mode, attachment->dbg_level,