Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CVE-2025-14282: dropbear, OpenWrt 24.10.4 to 24.10.5

This repeats the fix of OpenWrt security advisory 2025-12-16-1. With Unix domain socket forwarding, a user who logged in to Dropbear could make the server, still running as root, open a socket as root. OpenWrt 24.10.5 takes the upstream fix (OpenWrt commit 0f52a05): the server now drops to the privileges of the user as soon as the user logs in, in a new svr_switch_user, and no longer when it starts the shell, in execchild. The same update keeps the utmp group to record the logout, offers only the first host key when it rekeys, and fixes CVE-2019-6111 in scp.

OpenWrt runs sstrip on what it ships, so only the segments of the file are left. OpenWrt builds Dropbear as plain MIPS32, not MIPS16e as most of its MIPS user space, so this case and the ubusd case of CVE-2025-62526 read different instruction sets on MIPS.

Get the binaries

$ for v in 24.10.4 24.10.5; do
    mkdir -p $v
    curl -s https://downloads.openwrt.org/releases/$v/targets/armsr/armv8/openwrt-$v-armsr-armv8-rootfs.cpio.gz \
      | gunzip | (cd $v && cpio -id usr/sbin/dropbear)
  done

Compare

$ hereticus --format markdown 24.10.4/usr/sbin/dropbear 24.10.5/usr/sbin/dropbear
FUNCTIONCHANGESCORE+/-/~TOUCHEDMATCHED BY
sub_15fd0 -> sub_1650cchanged0.9574/37/08 branch, 16 call, 2 jump, 22 mem, 1 textsimilar
sub_15048 -> sub_1513cchanged0.2164/2/08 branch, 8 call, 2 jump, 17 mem, 4 textsame place
sub_19acc -> sub_19c14changed0.9142/20/05 branch, 10 call, 2 jump, 16 mem, 1 constsimilar
sub_3c48 -> sub_3d08changed0.9925/18/75 branch, 2 call, 1 jump, 8 mem, 6 const, 1 textsimilar
sub_13f8c -> sub_14078changed0.925/6/23 call, 6 memsimilar
sub_17e94 -> sub_18078changed0.985/6/23 call, 5 memsimilar
sub_18488 -> sub_18674changed0.944/39/44 branch, 10 call, 3 jump, 7 mem, 2 textsimilar
sub_17b48 -> sub_17dc0changed0.812/45/17 branch, 7 call, 2 jump, 10 mem, 3 textsimilar
sub_13e0c -> sub_13f90changed0.580/38/04 branch, 7 call, 1 jump, 8 mem, 2 textsame references
sub_2293c -> sub_22ad4changed0.990/0/2-similar
sub_c328 -> sub_c40cchanged values1.00-1 textidentical shape
sub_1c2a8 -> sub_1c440changed values1.00-1 textidentical shape
  • sub_13070: new
  • sub_130c0: new

417 matched (404 unchanged, 13 changed), 0 gone, 2 new

The texts each function points at name the rows:

RowFunctionWhat changed
sub_15fd0sink of scpCVE-2019-6111: names from the server must match the wildcard
sub_15048send_msg_userauth_successthe fix: svr_switch_user, inlined, drops to the user
sub_19accrecv_msg_kexdh_inita rekey offers only the host key in use
sub_3c48the options of the servernot read further
sub_13f8cthe owner of the ptythe utmp group is raised around it
sub_17b48execchildno longer changes the user
sub_13e0csvr_agentcleanupno longer takes the user’s IDs to remove the agent socket: the server runs as the user by then
sub_13070, sub_130c0svr_raise_gid_utmp, svr_restore_gidnew

The fix is on row 2. GCC inlined the new svr_switch_user into send_msg_userauth_success, which grew from 20 instructions to 77, so the code scores only 0.21. The pair holds because the function stays in its place between pairs on both sides.

Read the fix

$ hereticus --view il --diff sub_15048 24.10.4/usr/sbin/dropbear 24.10.5/usr/sbin/dropbear
...
  w0 = 1
  store.32 [@0x50ac8] = w0
- if (w1 != 0) goto $+0x8
+ call getuid
+ if (w0 != 0) goto $+0xb0
+ w0 = load.32 [@0x50aec]
+ if (w0 == 0) goto $+0x38
+ x1 = &page
+ x1 = load.64 [@setgid]
+ call setgid
+ if ((w0 & 0x80000000) == 0) goto $+0x10
+ x0 = &page
+ x0 = &"Error changing user group"
...
+ x0 = &"utmp"
+ call getgrnam
...
+ call setresgid
...
+ call setuid
...

ses.authstate.authdone = 1 is the store of 1; after it, the server now calls setgid, initgroups, setresgid and setuid while it is still in the authentication handler.

The other architectures

The same comparison on the other builds of the release:

BuildRowsRow of the fixScore
armsr/armv8, AArch641420.21
armsr/armv7, A323310.25
malta/be, MIPS32 big endian2220.28
malta/le, MIPS32 little endian1920.28

hereticus-cli/tests/truth_cves.rs locks these ranks, and fixtures/cve_binaries.py fetches and pins the binaries.