Latest Samba updates from NTGR broken

First off: If you’re not updating your ReadyNAS from the command line you’re most likely not affected.
Also, if you never logged into your ReadyNAS using SSH, you’re most likely not affected.

However, if you’re updating your ReadyNAS from the SSH command line using something along the lines of apt update && apt full-upgrade chances are that you received the latest, broken updates to the samba packages, identified by the extension netgear4 to their version number.

This update by NTGR should provide a fix for CVE-2021-44142. However, in the process this fix seems to have broken the connection between the samba daemons and the central system daemon that monitors whether a service is running or not. As a result your SMB services won’t start anymore. Or to be more precise: they will start but since they can’t report back their status to systemd they’ll be killed again right away by systemd.

The quick fix

To fix this and revert to the old versions of samba without the broken fix you need to

  • log into your ReadyNAS using SSH as the user “root”
  • run the following command
    apt install samba=2:4.8.0-12.netgear3 \
    samba-common-bin=2:4.8.0-12.netgear3 \
    samba-common=2:4.8.0-12.netgear3 \
    samba-libs=2:4.8.0-12.netgear3 \
    libwbclient0=2:4.8.0-12.netgear3 \
    samba-vfs-modules=2:4.8.0-12.netgear3 \
    winbind=2:4.8.0-12.netgear3 \
    libnss-winbind=2:4.8.0-12.netgear3 \

I have no idea why NTGR published the broken samba packages seemingly without proper testing. Most likely their dev environment doesn’t exhibit the problem between samba and systemd.

A word about the official Netgear Community (and how to not reach me there)

Nah, probably not what you think 😉 It’s just that lately I started receiving notifications about personal messages sent to my account there. Probably people also complain about me not answering or reacting in any way. Well. It’s not that I wouldn’t want to. The thing is that the forum software just won’t let me. No matter from where (home network, work network, mobile network) or with whatever device (PC, Mac, iPhone, Android phone, iPad) I try to login, all I’m getting is:

And yes, I also tried different browsers on the various devices, cleared cookies and whatnot. I suspect some kind of geo-fencing bullshit in action there.
Anyway: That’s why I don’t reply to personal messages and also don’t participate in the forums.

Fix for the “LetsEncrypt problem”

As you may know, one of the Root-CAs that are used by LetsEncrypt expired on September 30, 2021. Unfortunately this not only affects older browsers but also the ReadyNAS, mainly because the package ca-certificates of its underlying operating system never got updated and still uses the the expired Root-CA.

This affects all tools on the NAS that have to connect to external systems that use certificates from LetsEncrypt – and of course some add-ons like Nextcloud that regularly try to connect to external sites for updates.

To fix the problem I backported the ca-certificates package from the current Debian distribution (“bullseye”) to the ReadyNAS. I also rebuilt the most affected tools like curl, wget, gnutls and openssl. The complete package is available as a free add-on:

To install, make sure your ReadyNAS has a working internet connection (check the DNS settings) and just upload as you would with a normal add-on.

Note: After installation the add-on will NOT show up in the list of installed add-ons. This is done on purpose to not clutter the interface. If in doubt just install again, no harm there.

If you find the add-on useful, please consider a donation:

When the shit hits the fan …

it’s going to be messy. Well, what can I say. When releasing the Nextcloud 20 add-on I failed to test it on a NAS without PHP 7.4 already installed. Thus I didn’t notice that the automatic pulling of the required PHP packages didn’t work. Sorry for that.

Now, why don’t I just fix it? Simple reason: my development environment – which happened to be on a ReadyNAS – crashed with a 100% data loss. I’m trying to recover what I can but that takes time. Time I currently don’t have for there’s loads of work at my normal day job.

So for all of you who already tried to install the Nextcloud 20 add-on, here’s the work-around for you: Just download and install the PHP 7.4 add-on which is now available free of charge. Then install Nextcloud 20 and you should be a happy camper again.

Again: sorry for the troubles and have fun with your ReadyNAS.

NTGR repos broken for 6.10.2 (hold your updates)

Hi everyone,

Firmware 6.10.2 is out and unfortunately NTGR seems to have broken their package repositories with this release. From here it looks like there was a manual push of an updated package to the repos:

Get:2 6.10.2/main armel linux-libc-dev armel [774 kB]
Err:2 6.10.2/main armel linux-libc-dev armel
Writing more data than expected (774020 > 773886)
E: Failed to fetch Writing more data than expected (774020 > 773886)

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

This affects many if not all new app installations but may also have a negative impact on firmware upgrades where the ReadyNAS tries to get updated packages from its known repositories. In the worst case this error prevents the ReadyNAS from updating properly which in turn may trigger an automatic cleanup procedure which then starts to remove packages and by doing so breaks some apps. I already informed NTGR about the problem but today being Sunday I don’t expect any immediate action.

For the moment please either don’t upgrade to 6.10.2 or if you already did and ran into problems please be patient until the situation is resolved by NTGR.