#1110137 netplugd is failing to perform ifup/down notifications as link state changes

Package:
netplug
Source:
netplug
Description:
network link monitor daemon
Submitter:
Hoyer, David
Date:
2026-10-15 12:01:02 UTC
Severity:
normal
#1110137#5
Date:
2025-07-30 14:04:11 UTC
From:
To:
I have found that netplugd is reporting an error in the journal indicating it is killing a process when a link state transition happens.

Example journal message:
Jul 28 19:36:31 eos-a netplugd[2405]: /etc/netplug/netplug eth0 in -> pid 2405
Jul 28 19:36:31 eos-a netplugd[2404]: Unexpected child 1106527440 exited with status 0

And as a result it appears that the scripts in /etc/network/if-* are not getting called so our scripts which give our application link state changes are not being called.

I backed out the patch 70no-executable-stack.patch and rebuilt that and then everything started working as I was expecting.

#1110137#10
Date:
2025-08-27 23:34:11 UTC
From:
To:
I worked out the bug in the 70no-executable-stack.patch.   I realize this is not in the correct form for a Debian patch.  I am hoping the maintainers get this rolled into a Trixie fix for this package.

diff --git a/if_info.c b/if_info.c
index fbf6ffd..d2c8f02 100644
--- a/if_info.c
+++ b/if_info.c
@@ -317,7 +317,7 @@ void ifsm_scriptdone(pid_t pid, int exitstatus)

     int find_pid(struct if_info *i, void *arg) {
         pid_t pid = *(pid_t *)(((void **)arg)[0]);
-        struct if_info **info = (struct if_info **)(((void **)arg)[0]);
+        struct if_info **info = (struct if_info **)(((void **)arg)[1]);

         if (i->worker == pid) {
             *info = i;

#1110137#15
Date:
2025-08-27 23:22:08 UTC
From:
To:
I worked out the bug in the 70no-executable-stack.patch.   I realize this is not in the correct form for a Debian patch.  I am hoping the maintainers get this rolled into a Trixie fix for this package.

diff --git a/if_info.c b/if_info.c
index fbf6ffd..d2c8f02 100644
--- a/if_info.c
+++ b/if_info.c
@@ -317,7 +317,7 @@ void ifsm_scriptdone(pid_t pid, int exitstatus)

     int find_pid(struct if_info *i, void *arg) {
         pid_t pid = *(pid_t *)(((void **)arg)[0]);
-        struct if_info **info = (struct if_info **)(((void **)arg)[0]);
+        struct if_info **info = (struct if_info **)(((void **)arg)[1]);

         if (i->worker == pid) {
             *info = i;

#1110137#20
Date:
2026-10-15 11:58:01 UTC
From:
To:
Hello Debian Networking Team,

We independently identified and fixed the same issue in netplug 1.2.9.2-5
while investigating network recovery failures in SKUDONET virtual machines.

I originally emailed Pali Rohár on 19 May 2026 and followed up on 29
September, before becoming aware of this existing bug report.

The problem is in find_pid(), as modified by
debian/patches/70no-executable-stack.patch:

pid_t pid = *(pid_t *)(((void **)arg)[0]);
struct if_info **info = (struct if_info **)(((void **)arg)[0]);

The caller supplies:

arg[0] = &pid;
arg[1] = &info;

Therefore, the second expression must use arg[1]. With the current code,
*info = i writes an interface pointer into the storage occupied by pid,
corrupting the PID and potentially adjacent stack memory. The actual
interface pointer remains NULL, so ifsm_scriptdone() returns without
processing the script completion.

We observed:

Unexpected child -629697296 exited with status 0

This leaves the interface state machine unable to complete the expected
transition, even though the script exited successfully.

The one-line fix is:
--- a/if_info.c +++ b/if_info.c @@ -317,7 +317,7 @@ void ifsm_scriptdone(pid_t pid, int exitstatus) int find_pid(struct if_info *i, void *arg) { pid_t pid = *(pid_t *)(((void **)arg)[0]); - struct if_info **info = (struct if_info **)(((void **)arg)[0]); - struct if_info **info = (struct if_info **)(((void **)arg)[1]); if (i->worker == pid) { *info = i; We rebuilt the Trixie 1.2.9.2-5 source for a Debian Buster-based SKUDONET installation with this correction. The affected customer confirmed that recovery after Hyper-V live/quick migration worked with the corrected package. Source inspection also confirms that the incorrect index remains in Debian revision 1.2.9.2-7. Could you please incorporate this correction and consider a stable update for Trixie? It fixes a memory corruption bug that prevents normal handling of completed network event scripts. Thank you. Best regards, Emilio Campos Martín SKUDONET [image: Emilio Campos] [image: Telephone] +34 954 103 502 (ext 2) [image: Email] emilio.campos@skudonet.com [image: Website] www.skudonet.com [image: Location] Manufactura 8 (Boudere I) Floor 2, door 5. 41927 Mairena del Aljarafe Sevilla, Spain [image: SKUDONET] [image: Visit our Site] <https://www.skudonet.com> [image: LinkedIn] <https://www.linkedin.com/company/skudonet> [image: Twitter] <https://twitter.com/SKUDONET> [image: Facebook] <https://www.facebook.com/SKUDONET/>