isc-dhcp-server using wrong env variable for INTERFACES
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
isc-dhcp (Ubuntu) |
Fix Released
|
Undecided
|
Utkarsh Gupta | ||
Bionic |
Fix Released
|
Undecided
|
Utkarsh Gupta | ||
Focal |
Fix Released
|
Undecided
|
Utkarsh Gupta | ||
Groovy |
Fix Released
|
Undecided
|
Utkarsh Gupta |
Bug Description
[Impact]
When checking isc-dhcp-server unit file it was seen that isc-dhcp-server is being started by:
ConditionPathEx
ConditionPathEx
ConditionPathEx
[Service]
EnvironmentFile
RuntimeDirector
# The leases files need to be root:dhcpd even when dropping privileges
ExecStart=/bin/sh -ec '\
CONFIG_
if [ -f /etc/ltsp/
[ -e /var/lib/
chown root:dhcpd /var/lib/dhcp /var/lib/
chmod 775 /var/lib/dhcp ; chmod 664 /var/lib/
exec dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-
But the /etc/default/
This causes the service to listen on all interfaces, which is what the user might not want. In case the user wants to use *only* IPv6 and not IPv4, this could maybe lead to problems as what the user intended to do could be really different from what the outcome turns out to be (because of this bug).
The previous upload(er) forgot to mention (and split) the INTERFACES variable to v4 and v6 and as a result, it has been this way for so long.
The SRU would split the variables into respective names, thereby making sure that what /etc/default/
[Test Plan]
To reproduce this bug, simply do the following:
$ lxc launch ubuntu-daily:focal isc-dhcp-
$ lxc shell isc-dhcp-
# apt update && apt install isc-dhcp-server -y
# grep "INTERFACES" /etc/default/
INTERFACESv4=""
INTERFACESv6=""
grep "INTERFACES" /lib/systemd/
exec dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-
# grep "INTERFACES" /lib/systemd/
exec dhcpd -user dhcpd -group dhcpd -f -6 -pf /run/dhcp-
With this, it is clearly visible that even though /lib/systemd/
After the SRU is performed, the respective services files should use INTERFACESv4 and INTERFACESv6 variable, instead of just INTERFACES.
To ensure smooth upgrade of this package, we'd check if the user hasn't manually set a INTERFACESv{4,6} variable to workaround this bug. If they have, then we simply check and make sure, we use the correct variable.
[Where problems could occur]
The problem could occur if the user has manually set some different workaround for this bug and so the usual upgrade could break some of their old configuration(s).
Related branches
- Sergio Durigan Junior (community): Needs Fixing
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
- Utkarsh Gupta: Pending requested
-
Diff: 45 lines (+13/-2)3 files modifieddebian/changelog (+9/-0)
debian/isc-dhcp-server.isc-dhcp-server.service (+2/-1)
debian/isc-dhcp-server.isc-dhcp-server6.service (+2/-1)
- Sergio Durigan Junior (community): Approve
- Canonical Server packageset reviewers: Pending requested
- Canonical Server: Pending requested
-
Diff: 45 lines (+13/-2)3 files modifieddebian/changelog (+9/-0)
debian/isc-dhcp-server.isc-dhcp-server.service (+2/-1)
debian/isc-dhcp-server.isc-dhcp-server6.service (+2/-1)
- Utkarsh Gupta (community): Needs Fixing
- Canonical Server: Pending requested
- Canonical Server packageset reviewers: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 288 lines (+242/-2)5 files modifieddebian/changelog (+19/-0)
debian/isc-dhcp-server.isc-dhcp-server.service (+2/-1)
debian/isc-dhcp-server.isc-dhcp-server6.service (+2/-1)
debian/patches/CVE-2019-6470.patch (+218/-0)
debian/patches/series (+1/-0)
- Sergio Durigan Junior (community): Needs Fixing
- Canonical Server: Pending requested
- Canonical Server packageset reviewers: Pending requested
-
Diff: 45 lines (+13/-2)3 files modifieddebian/changelog (+9/-0)
debian/isc-dhcp-server.isc-dhcp-server.service (+2/-1)
debian/isc-dhcp-server.isc-dhcp-server6.service (+2/-1)
- Sergio Durigan Junior (community): Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 43 lines (+11/-2)3 files modifieddebian/changelog (+9/-0)
debian/isc-dhcp-server.isc-dhcp-server.service (+1/-1)
debian/isc-dhcp-server.isc-dhcp-server6.service (+1/-1)
Changed in isc-dhcp (Ubuntu): | |
status: | New → Triaged |
Changed in isc-dhcp (Ubuntu Focal): | |
status: | New → Confirmed |
Changed in isc-dhcp (Ubuntu Bionic): | |
status: | New → Triaged |
no longer affects: | isc-dhcp (Ubuntu Groovy) |
tags: | added: server-next |
tags: | added: bitesize |
Changed in isc-dhcp (Ubuntu): | |
status: | Triaged → Fix Released |
Changed in isc-dhcp (Ubuntu Groovy): | |
status: | New → Fix Released |
Changed in isc-dhcp (Ubuntu): | |
status: | Fix Released → Confirmed |
Changed in isc-dhcp (Ubuntu Bionic): | |
status: | Triaged → Confirmed |
Changed in isc-dhcp (Ubuntu Groovy): | |
status: | Fix Released → Confirmed |
Changed in isc-dhcp (Ubuntu): | |
status: | Confirmed → In Progress |
assignee: | nobody → Utkarsh Gupta (utkarsh) |
Changed in isc-dhcp (Ubuntu Bionic): | |
assignee: | nobody → Utkarsh Gupta (utkarsh) |
Changed in isc-dhcp (Ubuntu Focal): | |
assignee: | nobody → Utkarsh Gupta (utkarsh) |
Changed in isc-dhcp (Ubuntu Groovy): | |
assignee: | nobody → Utkarsh Gupta (utkarsh) |
Changed in isc-dhcp (Ubuntu): | |
status: | In Progress → Fix Released |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
see also https:/ /bugs.launchpad .net/ubuntu/ +source/ isc-dhcp/ +bug/1774342
Thanks