#1152854 procps: "sysctl -a" exits with non-zero status code despite apparently succeeding

Package:
procps
Source:
procps
Description:
/proc file system utilities
Submitter:
Christopher David Howie
Date:
2026-11-02 10:47:02 UTC
Severity:
normal
#1152854#5
Date:
2026-11-02 10:38:09 UTC
From:
To:
"sysctl -a" always exits with a non-zero status code on my system.  It
successfully dumps the value of over 2k settings.  This is causing
scripts that run this command to fail, despite it appearing to succeed:

# sysctl -a >/dev/null; echo $?
1
# sysctl -a | wc -l
2076

I believe this upstream merge request fixes the issue:

https://gitlab.com/procps-ng/procps/-/merge_requests/308

Based on the comment above the changed lines, errors reading IPv6
stable_secret settings should be ignored, but in the unfixed version,
the line that sets the exit status incorrectly uses EXIT_FAILURE.  The
merge request changes this to EXIT_SUCCESS.

Running the following script corroborates this as the likely issue on my
system:

for f in /proc/sys/net/ipv6/conf/*/stable_secret; do
     if ! cat "$f" >/dev/null 2>&1; then
         echo "Cannot read: $f"
     fi
done

This outputs:

Cannot read: /proc/sys/net/ipv6/conf/all/stable_secret
Cannot read: /proc/sys/net/ipv6/conf/default/stable_secret
Cannot read: /proc/sys/net/ipv6/conf/docker0/stable_secret
Cannot read: /proc/sys/net/ipv6/conf/enp0s31f6/stable_secret
Cannot read: /proc/sys/net/ipv6/conf/lo/stable_secret
Cannot read: /proc/sys/net/ipv6/conf/virbr0/stable_secret
Cannot read: /proc/sys/net/ipv6/conf/virbr1/stable_secret
Cannot read: /proc/sys/net/ipv6/conf/wgzabbix/stable_secret
Cannot read: /proc/sys/net/ipv6/conf/wt0/stable_secret
------------------------------------------------------------------------
                     IMPORTANT INFORMATION/DISCLAIMER

This document should be read only by those persons to whom it is
addressed.  If you have received this message it was obviously addressed
to you and therefore you can read it.

Additionally, by sending an email to ANY of my addresses or to ANY
mailing lists to which I am subscribed, whether intentionally or
accidentally, you are agreeing that I am "the intended recipient," and
that I may do whatever I wish with the contents of any message received
from you, unless a pre-existing agreement prohibits me from so doing.

This overrides any disclaimer or statement of confidentiality that may
be included on your message.