Bug 255514 - etcupdate cleared the executable bit from /etc/rc.d/netif when resolving conflicts
Summary: etcupdate cleared the executable bit from /etc/rc.d/netif when resolving conf...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 13.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-30 13:08 UTC by Ulrich Spörlein
Modified: 2021-05-01 18:28 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Spörlein freebsd_committer 2021-04-30 13:08:45 UTC
Hi,

this basically bricked a remote system (luckily I had OOB access).

First, freebsd-update bricked the update to 13 as it copied a half kernel over but the modules failed to load due to version symbol mismatch (what?). Then I did the regular kernel/world build and install, followed by etcupdate.

I have a sleep in /etc/rc.d/netif (phys link takes too long to come up), etcupdate entered the EDITOR to fix up the conflict, then I marked as resolved.
 
Rebooted and:
 
Starting devd.
eval: /etc/rc.d/netif: Permission denied
em1: link state changed to UP
debugnet_any_ifnet_update: Bad dn_init result from em1 (ifp 0xfffff80003c98000), ignoring.
eval: /etc/rc.d/netif: Permission denied
route: writing to routing socket: Network is unreachable
add net default: gateway 185.95.219.48 fib 0: Network is unreachable
Autoloading module: ichsmb.ko
eval: /etc/rc.d/netif: Permission denied
 
 
Dafuq?
 
root@acme:~# ls -l /etc/rc.d/net*
-rw-r--r--  1 root  wheel  5995 Apr 30 14:42 /etc/rc.d/netif
-r-xr-xr-x  1 root  wheel  2774 Jan  6 16:52 /etc/rc.d/netoptions
-r-xr-xr-x  1 root  wheel  3067 Jan  6 16:52 /etc/rc.d/netwait