0_git20231012-r0📖 ~4 min read • Source: Alpine secdb entry — stb 0_git20231012-r0
Related CVEs: CVE-2023-43898 CVE-2023-45661 CVE-2023-45662 CVE-2023-45663 CVE-2023-45664 CVE-2023-45666 CVE-2023-45667 CVE-2023-45675
Upstream summary: Alpine community repository for vedge ships stb 0_git20231012-r0 which addresses CVE-2023-43898.
Table of contents
Symptom & Impact
Nothing executes stb on its own; its code runs inside whatever links against or imports it, so the exposed surface on an Alpine Linux edge host is the union of every process that has loaded it — web workers, cron jobs, mail handlers, backup agents. The package manager replaces the files on disk, but processes already running keep the old build mapped, and virtualenvs, vendored copies and container images each carry their own copy, so a host can report itself patched while still running vulnerable code. stb is a library — code loaded by other programs rather than a daemon — so there is no service to restart and rc-service stb will simply report no such service; restart its consumers instead.
Environment & Reproduction
Reproduction targets Alpine Linux edge. Confirm release and the installed package:
cat /etc/alpine-release
cat /etc/os-release
apk info -v stb
apk policy stb
apk version | grep -w stb || true
Exercise the workload that uses stb while collecting:
sudo tail -200 /var/log/messages # busybox syslog / syslog-ng
sudo dmesg | tail -200
rc-service "$SVC" needsme # HARD dependants: OpenRC will stop these, restart $SVC, then start them again - review this list before you touch anything
rc-service "$SVC" restart && rc-service "$SVC" status # restart and confirm 'status: started' - never assume it came back
rc-service nginx reload # WARNING - reload/HUP does NOT re-exec the binary, the old deleted library stays mapped. For a shared-library patch you MUST use 'restart', not 'reload'.
rc-service sshd restart # safe: OpenRC restarts the listener only, established SSH sessions survive - still, keep a second session open before you run it
sudo rc-status
sudo apk audit --system
Root Cause Analysis
Root cause is recorded in Alpine secdb entry — stb 0_git20231012-r0. Alpine maintainers shipped the fix in 0_git20231012-r0 for Alpine Linux edge; running an older build leaves the host exposed. Correlate apk transactions with the kernel ring buffer and OpenRC logs:
sudo tail -200 /var/log/apk.log
apk info -v stb
apk info -L stb | head
sudo dmesg --ctime | tail -100
ls -lt /var/log/rc.log 2>/dev/null && sudo tail -100 /var/log/rc.log
Quick Triage
Run these on Alpine Linux edge to capture the current state of stb:
apk info -v stb # installed version
apk policy stb # repository / pin info
apk version -l '<' # all packages with newer candidates
sudo apk audit --system
apk info -L stb | head # files shipped by stb
sudo rc-status # OpenRC runtime state
sudo rc-update show # services per runlevel
sudo iptables -L -n -v --line-numbers 2>/dev/null | head -40
sudo nft list ruleset 2>/dev/null | head -40
# If stb ships an OpenRC service (init name may differ from pkg name,
# e.g. nginx, postgresql, php-fpm83):
ls /etc/init.d/ | grep -i stb | head
Step-by-Step Diagnosis
-
List OpenRC services and any failed ones.
sudo rc-status sudo rc-status --crashed -
Inspect logs for
stb.sudo grep -i stb /var/log/messages | tail -200 sudo dmesg | tail -200 -
Inspect firewall posture (Alpine ships iptables/nftables or the awall front-end).
sudo iptables -L -n -v --line-numbers sudo nft list ruleset sudo awall list 2>/dev/null || true -
Verify
stbintegrity and reinstall if files are altered.sudo apk verify stb sudo apk fix stb -
Confirm the current vs. available version for
stb.apk version | grep -w stb || true apk policy stb -
Correlate findings with
/var/log/apk.logand Alpine secdb entry — stb 0_git20231012-r0 to pin the change that introduced the regression.
Solution – Primary Fix
Apply the corrective apk transaction referenced by Alpine secdb entry — stb 0_git20231012-r0, then restart affected OpenRC services:
sudo apk update
sudo apk upgrade --available --no-cache # apply all repository updates
# Or target a single package:
sudo apk add --upgrade stb
apk info -v stb # confirm new version
sudo rc-update add stb default 2>/dev/null || true
For kernel / musl / openssl updates a reboot is required (Alpine has no live-patching equivalent of kpatch):
apk info -v linux-lts linux-virt 2>/dev/null
sudo sync && sudo reboot
# On Alpine diskless / lbu installations, commit the change first:
sudo lbu status
sudo lbu commit -d
Need help rolling this patch across an Alpine fleet? Our IT Solutions & Services team manages Alpine Linux container fleets and bare-metal edge installs with apk-based CI patching pipelines. Get in touch for a free consultation.
Solution – Alternative Approaches
If the primary patch is not viable, choose from these:
-
Roll back to a known-good version by installing a pinned version from
/etc/apk/cache:ls /etc/apk/cache/ | head sudo apk add stb=0_git20231012-r0 # downgrade / pin to a specific version sudo apk fix -
Hold the package so apk cannot upgrade it during the next
apk upgrade:echo 'stb' | sudo tee -a /etc/apk/world # To pin a version, edit /etc/apk/world to read: stb=0_git20231012-r0 sudo apk fix -
Pull the fix from
edgewhile staying on a stable release (tagged repo):echo '@edge https://dl-cdn.alpinelinux.org/alpine/edge/main' | sudo tee -a /etc/apk/repositories sudo apk add stb@edge -
Use awall to ring-fence the affected service while you patch:
sudo apk add awall sudo awall list sudo awall enable <policy> sudo awall activate -
Take an lbu snapshot of
/etcbefore kernel / musl upgrades (Alpine diskless mode):sudo lbu status sudo lbu package /var/backups/alpine-pre-upgrade.apkovl.tar.gz # Revert later by booting from media and restoring the apkovl tarball. -
For container deployments, rebuild the image from a patched base:
docker run --rm alpine:edge apk version | grep -w stb || true # In your Dockerfile, force a refresh: RUN apk add --no-cache --upgrade stb
Verification & Acceptance Criteria
All of these should pass after the fix:
apk info -v stb # expected fixed version
sudo apk audit --system # the package no longer flagged
sudo apk verify stb
sudo grep -iE 'error|fail' /var/log/messages | grep -i stb | tail -50 || echo OK
sudo iptables -L -n -v | head -20
sudo nft list ruleset | head -20
The conditions described in the advisory must no longer be reported for stb across two consecutive runs.
Rollback Plan
Capture state before any change:
apk info -v > /root/apk-pre.txt
sudo cp /etc/apk/world /root/world-pre
sudo cp -a /var/log/apk.log /root/apk.log-pre 2>/dev/null || true
# On lbu / diskless installs, snapshot the apkovl:
sudo lbu package /var/backups/alpine-pre-upgrade.apkovl.tar.gz
To revert if the patch is bad:
# Reinstall the previous version from /etc/apk/cache (must be mounted):
ls /etc/apk/cache/ | head
sudo apk add stb=<previous-version>
# Or restore the saved apkovl on diskless:
sudo tar -xzf /var/backups/alpine-pre-upgrade.apkovl.tar.gz -C /
sudo reboot
Prevention & Hardening
Reduce the chance of this recurring on Alpine Linux edge:
-
Run
apk audit --systemon a schedule and fail builds on new findings:# /etc/periodic/daily/apk-audit #!/bin/sh apk update -q && apk audit --system > /var/log/apk-audit.log -
Mount
/etc/apk/cacheso previous versions are always available for rollback:sudo mkdir -p /etc/apk/cache sudo setup-apkcache /etc/apk/cache -
Subscribe to alpine-security and watch security.alpinelinux.org for new CVE entries.
-
Mirror the Alpine repository locally for controlled rollouts:
sudo apk add rsync rsync -av --delete rsync://rsync.alpinelinux.org/alpine/v3.20/main/ /srv/mirror/v3.20/main/ rsync -av --delete rsync://rsync.alpinelinux.org/alpine/v3.20/community/ /srv/mirror/v3.20/community/ -
Pin sensitive packages in
/etc/apk/worldwith explicit versions so apk cannot silently bump them. -
Alpine does not enable mandatory-access-control frameworks (such as AppArmor) by default; consult [grsecurity/PaX] or [seccomp profile] in container deployments and apply CIS-style hardening for Alpine Linux edge (disable unused OpenRC services, set
rc_logger=YESin/etc/rc.conf, mount/tmpwithnosuid,nodev). -
For container fleets, scan images in CI:
docker run --rm alpine:edge apk version trivy image --severity HIGH,CRITICAL myrepo/app:tag
Related Errors & Cross-Refs
Issues that commonly surface alongside a stb update: apk lock contention (/var/lib/apk/lock), OpenRC dependency cycles, busybox applet quirks vs. coreutils, and musl-vs-glibc behavioural differences. Useful triage:
sudo apk fix
sudo rc-status --crashed
ls /var/lib/apk/lock 2>/dev/null
sudo grep -i busybox /var/log/messages | tail
cat /proc/sys/kernel/tainted
View all alpine-edge tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Primary reference: Alpine secdb entry — stb 0_git20231012-r0. Manual pages useful on Alpine Linux edge:
apk --help
man apk
man rc-service
man rc-update
man rc-status
man iptables
man nft
man awall
man lbu
Other resources: wiki.alpinelinux.org, security.alpinelinux.org, pkgs.alpinelinux.org, and per-package notes in /usr/share/doc/stb/ for components implicated in this advisory.