View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017619 | CentOS-7 | dhcp | public | 2020-07-24 11:28 | 2020-07-24 12:50 |
Reporter | shader | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 7.8-2003 | ||||
Summary | 0017619: dhclient runs out of all available addresses in the pool in case of abnormal script termination | ||||
Description | ---- Copied from https://gitlab.isc.org/isc-projects/dhcp/-/issues/123 = Preface = Some Linux distribution, eg. CentOS Linux 7.x or 8.x, use NetworkManager to configure network interfaces. The dhclient command started by NetworkManager looks like this: /sbin/dhclient -d -q -sf /usr/libexec/nm-dhcp-helper \ -pf /run/NetworkManager/dhclient-<iface_name>.pid \ -lf /var/lib/NetworkManager/dhclient-<connection_uuid>-<iface_name>.lease \ -cf /var/lib/NetworkManager/dhclient-<iface_name>.conf <iface_name> When dhclient receive answer from server on lease renewal it use script or binary specified by -sf option for IP validity checking. /* If the BOUND/RENEW code detects another machine using the offered address, it exits nonzero. We need to send a DHCPDECLINE and toss the lease. */ if (script_go(client)) { make_decline(client, client->new); send_decline(client); destroy_client_lease(client->new); But the script_go function return non-zero result in the 2 cases: Launched process exit status is non-zero. In this case script_go function return value > 0. Launched process terminated by signal, eg. SIGTEM. In this case script_go function return value < 0. = Problem description = Let's imagine the next situation. nm-dhcp-helper or other script or binary specified by -sf option starting at some time will always terminates by SIGSEGV due to filesystem damage or some dynamic library incompatibility. In this case the dhclient will send DECLINE and retry lease renewal after 10 seconds timeout. This will repeat infinitely until all available addresses in the DHCP pool will be marked as invalid and other clients will not be able to lease an IP address. = Solution = To eliminate the possibility of a repetition of such a situation, it is enough in the above code fragment to replace a line if (script_go(client)) { by if (script_go(client) > 0) { | ||||
Steps To Reproduce | 1. Create simple C-program that will always cause SIGSEGV: --- example.c --- int main () { char *p; memset(p, 0, 1000000); } --- cut here --- 2. Compile example with following command: gcc -o nm-dhcp-helper example.c 3. Replace original /usr/libexec/nm-dhcp-helper by compiled example. 4. Wait for dhclient renew lease | ||||
Tags | No tags attached. | ||||
abrt_hash | |||||
URL | https://gitlab.isc.org/isc-projects/dhcp/-/issues/123 | ||||
Given that CentOS is a rebuild of the sources used to create RHEL and aims to reproduce RHEL bug for bug and feature for feature, we cannot implement the change you suggest. Please submit it to Redhat via bugzilla.redhat.com and if/when RH accepts it and incorporates it into RHEL and releases a patched version, CentOS will pick it up automatically. For easier tracking, please crosslink this bug with the one opened at bugzilla.redhat.com. |
|
https://bugzilla.redhat.com/show_bug.cgi?id=1860391 | |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-07-24 11:28 | shader | New Issue | |
2020-07-24 12:29 | ManuelWolfshant | Note Added: 0037412 | |
2020-07-24 12:50 | shader | Note Added: 0037413 |