CVE-2022-41720 fix is breaking AGH on OpenWRT #4114

Closed
opened 2026-03-04 04:47:15 -05:00 by deekerman · 12 comments
Owner

Originally created by @zuzuman on GitHub (Dec 12, 2022).

Prerequisites

  • I have checked the Wiki and Discussions and found no answer

  • I have searched other issues and found no duplicates

  • I want to report a bug and not ask a question

Operating system type

Linux, OpenWrt

CPU architecture

64-bit ARM

Installation

GitHub releases or script from README

Setup

On a router, DHCP is handled by the router

AdGuard Home version

v0.107.20

Description

What did you do?

Fresh install on latest OpenWRT.
After restart - AdGuardHome is no more starting

Expected result

Ability to run AGH after restart or router or service itself

Actual result

After service restart it's crushing with error [fatal] initing hosts container: hosts container: path at index 0: stat etc/hosts: os: DirFS with empty root

Additional information

Editing yaml configuration file with

clients: 
  runtime_sources: 
    hosts: false

is allowing to start AGH after stopping

Originally created by @zuzuman on GitHub (Dec 12, 2022). ### Prerequisites - [X] I have checked the [Wiki](https://github.com/AdguardTeam/AdGuardHome/wiki) and [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions) and found no answer - [X] I have searched other issues and found no duplicates - [X] I want to report a bug and not ask a question ### Operating system type Linux, OpenWrt ### CPU architecture 64-bit ARM ### Installation GitHub releases or script from README ### Setup On a router, DHCP is handled by the router ### AdGuard Home version v0.107.20 ### Description #### What did you do? Fresh install on latest OpenWRT. After restart - AdGuardHome is no more starting #### Expected result Ability to run AGH after restart or router or service itself #### Actual result After service restart it's crushing with error `[fatal] initing hosts container: hosts container: path at index 0: stat etc/hosts: os: DirFS with empty root` #### Additional information Editing yaml configuration file with ``` clients: runtime_sources: hosts: false ``` is allowing to start AGH after stopping
deekerman 2026-03-04 04:47:15 -05:00
Author
Owner

@ainar-g commented on GitHub (Dec 13, 2022):

Hello. I cannot reproduce this. In fact, I'm not sure how this is possible, considering that the error is only shown when the root directory is empty, and in v0.107.20 it is not.

@ainar-g commented on GitHub (Dec 13, 2022): Hello. I cannot reproduce this. In fact, I'm not sure how this is possible, considering that the error is only shown [when the root directory is empty][1], and in v0.107.20 [it is not][2]. [1]: https://github.com/golang/go/blob/master/src/os/file.go#L653-L655 [2]: https://github.com/AdguardTeam/AdGuardHome/blob/v0.107.20/internal/aghos/os_unix.go#L13-L15
Author
Owner

@zuzuman commented on GitHub (Dec 13, 2022):

If you want, I can run error trace - just tell how to run it in debug mode

@zuzuman commented on GitHub (Dec 13, 2022): If you want, I can run error trace - just tell how to run it in debug mode
Author
Owner

@ainar-g commented on GitHub (Dec 13, 2022):

Yes, you can enable verbose logging and either attach the logs here or send them to devteam@adguard.com, if there are private data there. Having the output of ./AdGuardHome -v --version from the AdGuard Home working directory would help too.

@ainar-g commented on GitHub (Dec 13, 2022): Yes, you can [enable verbose logging][1] and either attach the logs here or send them to <devteam@adguard.com>, if there are private data there. Having the output of `./AdGuardHome -v --version` from the AdGuard Home working directory would help too. [1]: https://github.com/AdguardTeam/AdGuardHome/wiki/FAQ#verboselog
Author
Owner

@Concubine commented on GitHub (Dec 19, 2022):

Hello, I seem to have this exact error as well:
[fatal] initing hosts container: hosts container: path at index 0: stat etc/hosts: os: DirFS with empty root

I'm trying to enable debug but have no yaml file anywhere:

root@MainT:~# find / -iname AdGuardHome.yaml
root@MainT:~#

uname -a :
Linux MainT 5.4.215 #0 SMP Thu Oct 13 19:16:38 2022 armv7l GNU/Linux

I installed from luci and followed wiki as described in openwrt wiki and used the script, now my default dnsmasq is 54 and I have to manually define all my DNS to be able to browse.. opkg won't work and commands from terminal (unless dns lookup is manually defined) won't reach internet and I can't opkg update or install - sad.

@Concubine commented on GitHub (Dec 19, 2022): Hello, I seem to have this exact error as well: [fatal] initing hosts container: hosts container: path at index 0: stat etc/hosts: os: DirFS with empty root I'm trying to enable debug but have no yaml file anywhere: `root@MainT:~#` find / -iname AdGuardHome.yaml `root@MainT:~#` uname -a : Linux MainT 5.4.215 #0 SMP Thu Oct 13 19:16:38 2022 armv7l GNU/Linux I installed from luci and followed wiki as described in [openwrt wiki](https://openwrt.org/docs/guide-user/services/dns/adguard-home) and used the script, now my default dnsmasq is 54 and I have to manually define all my DNS to be able to browse.. opkg won't work and commands from terminal (unless dns lookup is manually defined) won't reach internet and I can't opkg update or install - sad.
Author
Owner

@zer0pwned commented on GitHub (Dec 19, 2022):

Strange, I'm having nearly identical issue with up to date OpenWRT and Adguardhome. Changing hosts to false is a workaround so far.

@zer0pwned commented on GitHub (Dec 19, 2022): Strange, I'm having nearly identical issue with up to date OpenWRT and Adguardhome. Changing hosts to false is a workaround so far.
Author
Owner

@Concubine commented on GitHub (Dec 20, 2022):

@zer0pwned What do you mean changing hosts to false? where do you mean..

There isn't an adguardhome.yaml file anywhere it seems, where could I find the configuration file?
So far I've changed resolve.conf to search 1.1.1.1 so I can use but it seems my local DNS is busted after the adguard install, I can revert back using dnsmasq with some tweaking but I'd like to get adguard working.

EDIT: Not sure it is related to the CVE issue to be honest, just the first entry I found relating to: [fatal] initing hosts container: hosts container: path at index 0: stat etc/hosts: os: DirFS with empty root

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268444
The above link suggests 107.20 fixes this problem, but I can't seem to be able to update for some reason, remains on 107.6 when trying to update through opkg.

Need to talk to openwrt about them updating this version - anyone else that has " [fatal] initing hosts container: hosts container: path at index 0: stat etc/hosts: os: DirFS with empty root" try to upgrade to version 107.20

@Concubine commented on GitHub (Dec 20, 2022): @zer0pwned What do you mean changing hosts to false? where do you mean.. There isn't an adguardhome.yaml file anywhere it seems, where could I find the configuration file? So far I've changed resolve.conf to search 1.1.1.1 so I can use but it seems my local DNS is busted after the adguard install, I can revert back using dnsmasq with some tweaking but I'd like to get adguard working. EDIT: Not sure it is related to the CVE issue to be honest, just the first entry I found relating to: [fatal] initing hosts container: hosts container: path at index 0: stat etc/hosts: os: DirFS with empty root https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268444 The above link suggests 107.20 fixes this problem, but I can't seem to be able to update for some reason, remains on 107.6 when trying to update through opkg. Need to talk to openwrt about them updating this version - anyone else that has " [fatal] initing hosts container: hosts container: path at index 0: stat etc/hosts: os: DirFS with empty root" try to upgrade to version 107.20
Author
Owner

@zer0pwned commented on GitHub (Dec 20, 2022):

@Concubine see OP's additional information. Do you have the YAML file under your /etc folder?

@zer0pwned commented on GitHub (Dec 20, 2022): @Concubine see OP's additional information. Do you have the YAML file under your /etc folder?
Author
Owner

@BrunoLindorfer commented on GitHub (Dec 22, 2022):

Same here for me! I did a clean install (x86) today. Adguard worked after initial installation, but wont start after a reboot.
This seems to be realted.

@BrunoLindorfer commented on GitHub (Dec 22, 2022): Same here for me! I did a clean install (x86) today. Adguard worked after initial installation, but wont start after a reboot. [This seems to be realted.](https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268444)
Author
Owner

@Concubine commented on GitHub (Dec 22, 2022):

Same here for me! I did a clean install (x86) today. Adguard worked after initial installation, but wont start after a reboot. This seems to be realted.

Yo! for me I used:
curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
and then it was installed and am able to use it with no issues, the problem for me was it didn't get installed properly from the openwrt repository.

@Concubine commented on GitHub (Dec 22, 2022): > Same here for me! I did a clean install (x86) today. Adguard worked after initial installation, but wont start after a reboot. [This seems to be realted.](https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268444) Yo! for me I used: curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v and then it was installed and am able to use it with no issues, the problem for me was it didn't get installed properly from the openwrt repository.
Author
Owner

@Concubine commented on GitHub (Dec 22, 2022):

@Concubine see OP's additional information. Do you have the YAML file under your /etc folder?

Nope, it just wasn't installed properly - as per my previous reply to @BrunoLindorfer - I reinstalled using the guide here for latest stable and now works fine.

@Concubine commented on GitHub (Dec 22, 2022): > @Concubine see OP's additional information. Do you have the YAML file under your /etc folder? Nope, it just wasn't installed properly - as per my previous reply to @BrunoLindorfer - I reinstalled using the guide here for latest stable and now works fine.
Author
Owner

@bigwatercar commented on GitHub (Jan 1, 2023):

ility to run AGH after restart or router or service itsel

I have same issue, and your workaround worked.

change /etc/adguardhome.yaml [clients]->hosts to false

@bigwatercar commented on GitHub (Jan 1, 2023): > ility to run AGH after restart or router or service itsel I have same issue, and your workaround worked. change /etc/adguardhome.yaml [clients]->hosts to false
Author
Owner

@overwatch3560 commented on GitHub (Mar 25, 2024):

I'm glad your issue was resolved using the workaround
If you still encounter any problems you know where to find us!

@overwatch3560 commented on GitHub (Mar 25, 2024): I'm glad your issue was resolved using the workaround If you still encounter any problems you know where to find us!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AdGuardHome#4114
No description provided.