[GH-ISSUE #148] CPS config causes router hang and reboot #92

Open
opened 2026-10-13 21:06:27 +00:00 by bsakaguchi · 3 comments
Owner

Originally created by @nik-sie on GitHub (Mar 7, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/148

Environment:

Architecture: MediaTek MT7621 ver:1 eco:3
Target Platform: ramips/mt7621
Firmware Version: OpenWrt 24.10.5 r29087-d9c5716d1d / LuCI openwrt-24.10 branch 26.039.68875~ec3d818
Kernel Version: 6.6.119

opkg list-installed | grep amnezia

amneziawg-tools - 1.0.20250903-r1
kmod-amneziawg - 6.6.119.1.0.20251104-r1
luci-proto-amneziawg - 2.0.4-r1

Interface config:

  public key: (hidden)
  private key: (hidden)
  listening port: 39496
  jc: 3
  jmin: 64
  jmax: 256
  h1: 1
  h2: 2
  h3: 3
  h4: 4
  i1: <b 0x494e564954452033323039333040766f6963652e676f6f676c652e636f6d205349502f322e300d0a5669613a205349502f322e302f554450203139322e3136382e38372e31303a31303230303b72706f72743b6272616e63683d><rc 41><b 0x0d0a4d61782d466f7277617264733a2037300d0a46726f6d3a202273702d31343422203c7369703a35393834393840766f6963652e676f6f676c652e636f6d3e3b7461673d><rd 32><b 0x0d0a546f3a203c7369703a33323039333040766f6963652e676f6f676c652e636f6d3e0d0a436f6e746163743a202273702d31343422203c7369703a353938343938403139322e3136382e38372e31303a31303230303b6f623e3b2b7369702e6963650d0a43616c6c2d49443a20><rd 32><b 0x0d0a435365713a2038373430><c><b 0x20494e564954450d0a416c6c6f773a20505241434b2c20494e564954452c2041434b2c204259452c2043414e43454c2c205550444154452c20494e464f2c205355425343524942452c204e4f544946592c2052454645522c204d4553534147452c204f5054494f4e530d0a537570706f727465643a207265706c616365732c2031303072656c2c2074696d65722c206e6f72656665727375620d0a53657373696f6e2d457870697265733a20313830300d0a4d696e2d53453a2039300d0a557365722d4167656e743a205349502f31332e312e320d0a436f6e74656e742d547970653a206170706c69636174696f6e2f7364700d0a436f6e74656e742d4c656e6774683a203439340d0a0d0a763d300d0a6f3d2d20><rd 10><b 0x20><rd 10><b 0x20494e20495034203139322e3136382e38372e31300d0a733d706a6d656469610d0a623d41533a38340d0a743d3020300d0a613d582d6e61743a300d0a6d3d617564696f203130323033205254502f415650203138203820302033203130310d0a633d494e20495034203139322e3136382e38372e31300d0a623d544941533a36343030300d0a613d727463703a313032303420494e20495034203139322e3136382e38372e31300d0a613d73656e64726563760d0a613d7274706d61703a313820473732392f383030300d0a613d7274706d61703a332047534d2f383030300d0a613d666d74703a31303120302d31360d0a613d737372633a><rd 10><b 0x20636e616d653a><rd 16><b 0x0d0a613d6963652d75667261673a><rd 8><b 0x0d0a613d6963652d7077643a><rd 24><b 0x0d0a613d63616e6469646174653a><rc 9><b 0x20312055445020><rd 10><b 0x203139322e3136382e38372e31302031303230332074797020686f73740d0a613d63616e6469646174653a><rc 9><b 0x20322055445020><rd 10><b 0x203139322e3136382e38372e31302031303230342074797020686f73740d0a613d63727970746f3a31204145535f434d5f3132385f484d41435f534841315f383020696e6c696e653a><rc 11><b 0x0d0a0d0a>
  i2: <b 0x41434b2033323039333040766f6963652e676f6f676c652e636f6d205349502f322e300d0a5669613a205349502f322e302f554450203139322e3136382e38372e31303a31303230303b72706f72743b6272616e63683d><rc 41><b 0x0d0a4d61782d466f7277617264733a2037300d0a46726f6d3a202273702d31343422203c7369703a35393834393840766f6963652e676f6f676c652e636f6d3e3b7461673d><rd 32><b 0x0d0a546f3a203c7369703a33323039333040766f6963652e676f6f676c652e636f6d3e3b7461673d><rc 41><b 0x0d0a43616c6c2d49443a20><rd 32><b 0x0d0a435365713a2038373430><c><b 0x2041434b0d0a436f6e74656e742d4c656e6774683a20300d0a0d0a>
  i3: <b 0x494e564954452033323039333040766f6963652e676f6f676c652e636f6d205349502f322e300d0a5669613a205349502f322e302f554450203139322e3136382e38372e31303a31303230303b72706f72743b6272616e63683d><rc 41><b 0x0d0a4d61782d466f7277617264733a2037300d0a46726f6d3a202273702d31343422203c7369703a35393834393840766f6963652e676f6f676c652e636f6d3e3b7461673d><rd 32><b 0x0d0a546f3a203c7369703a33323039333040766f6963652e676f6f676c652e636f6d3e0d0a436f6e746163743a202273702d31343422203c7369703a353938343938403139322e3136382e38372e31303a31303230303b6f623e3b2b7369702e6963650d0a43616c6c2d49443a20><rd 32><b 0x0d0a435365713a2038373430><c><b 0x20494e564954450d0a416c6c6f773a20505241434b2c20494e564954452c2041434b2c204259452c2043414e43454c2c205550444154452c20494e464f2c205355425343524942452c204e4f544946592c2052454645522c204d4553534147452c204f5054494f4e530d0a537570706f727465643a207265706c616365732c2031303072656c2c2074696d65722c206e6f72656665727375620d0a53657373696f6e2d457870697265733a20313830300d0a4d696e2d53453a2039300d0a557365722d4167656e743a205349502f31332e312e320d0a417574686f72697a6174696f6e3a2044696765737420757365726e616d653d226e696b222c207265616c6d3d22617374657269736b222c206e6f6e63653d22><t><b 0x2f><rd 32><b 0x222c207572693d2233323039333040766f6963652e676f6f676c652e636f6d222c20726573706f6e73653d22><rd 32><b 0x222c20616c676f726974686d3d4d44352c20636e6f6e63653d22><rd 32><b 0x222c206f70617175653d22><rd 16><b 0x222c20716f703d617574682c206e633d30303030303030310d0a436f6e74656e742d547970653a206170706c69636174696f6e2f7364700d0a436f6e74656e742d4c656e6774683a203332300d0a0d0a763d300d0a6f3d2d20><rd 10><b 0x20><rd 10><b 0x20494e20495034203139322e3136382e38372e31300d0a733d706a6d656469610d0a623d41533a38340d0a743d3020300d0a613d582d6e61743a300d0a6d3d617564696f203130323033205254502f415650203138203820302033203130310d0a633d494e20495034203139322e3136382e38372e31300d0a623d544941533a36343030300d0a613d727463703a313032303420494e20495034203139322e3136382e38372e31300d0a613d73656e64726563760d0a613d7274706d61703a313820473732392f383030300d0a613d7274706d61703a332047534d2f383030300d0a613d666d74703a31303120302d31360d0a613d737372633a><rd 10><b 0x20636e616d653a><rd 16><b 0x0d0a613d6963652d75667261673a><rd 8><b 0x0d0a613d6963652d7077643a><rd 24><b 0x0d0a0d0a>

Upon calling ifup awg0, the logread -f command gives following messages before router hangs and goes into reboot:

user.notice amneziawg: info: using kernel-space kmod-amneziawg for /usr/bin/awg
daemon.notice netifd: awg0 (9541): Unable to access interface: Message too large
daemon.notice netifd: Interface 'awg0' is now up
daemon.notice netifd: Network device 'awg0' link is up

The effect is consistent across all my routers.

Originally created by @nik-sie on GitHub (Mar 7, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/148 Environment: ``` Architecture: MediaTek MT7621 ver:1 eco:3 Target Platform: ramips/mt7621 Firmware Version: OpenWrt 24.10.5 r29087-d9c5716d1d / LuCI openwrt-24.10 branch 26.039.68875~ec3d818 Kernel Version: 6.6.119 ``` `opkg list-installed | grep amnezia` ``` amneziawg-tools - 1.0.20250903-r1 kmod-amneziawg - 6.6.119.1.0.20251104-r1 luci-proto-amneziawg - 2.0.4-r1 ``` Interface config: ``` public key: (hidden) private key: (hidden) listening port: 39496 jc: 3 jmin: 64 jmax: 256 h1: 1 h2: 2 h3: 3 h4: 4 i1: <b 0x494e564954452033323039333040766f6963652e676f6f676c652e636f6d205349502f322e300d0a5669613a205349502f322e302f554450203139322e3136382e38372e31303a31303230303b72706f72743b6272616e63683d><rc 41><b 0x0d0a4d61782d466f7277617264733a2037300d0a46726f6d3a202273702d31343422203c7369703a35393834393840766f6963652e676f6f676c652e636f6d3e3b7461673d><rd 32><b 0x0d0a546f3a203c7369703a33323039333040766f6963652e676f6f676c652e636f6d3e0d0a436f6e746163743a202273702d31343422203c7369703a353938343938403139322e3136382e38372e31303a31303230303b6f623e3b2b7369702e6963650d0a43616c6c2d49443a20><rd 32><b 0x0d0a435365713a2038373430><c><b 0x20494e564954450d0a416c6c6f773a20505241434b2c20494e564954452c2041434b2c204259452c2043414e43454c2c205550444154452c20494e464f2c205355425343524942452c204e4f544946592c2052454645522c204d4553534147452c204f5054494f4e530d0a537570706f727465643a207265706c616365732c2031303072656c2c2074696d65722c206e6f72656665727375620d0a53657373696f6e2d457870697265733a20313830300d0a4d696e2d53453a2039300d0a557365722d4167656e743a205349502f31332e312e320d0a436f6e74656e742d547970653a206170706c69636174696f6e2f7364700d0a436f6e74656e742d4c656e6774683a203439340d0a0d0a763d300d0a6f3d2d20><rd 10><b 0x20><rd 10><b 0x20494e20495034203139322e3136382e38372e31300d0a733d706a6d656469610d0a623d41533a38340d0a743d3020300d0a613d582d6e61743a300d0a6d3d617564696f203130323033205254502f415650203138203820302033203130310d0a633d494e20495034203139322e3136382e38372e31300d0a623d544941533a36343030300d0a613d727463703a313032303420494e20495034203139322e3136382e38372e31300d0a613d73656e64726563760d0a613d7274706d61703a313820473732392f383030300d0a613d7274706d61703a332047534d2f383030300d0a613d666d74703a31303120302d31360d0a613d737372633a><rd 10><b 0x20636e616d653a><rd 16><b 0x0d0a613d6963652d75667261673a><rd 8><b 0x0d0a613d6963652d7077643a><rd 24><b 0x0d0a613d63616e6469646174653a><rc 9><b 0x20312055445020><rd 10><b 0x203139322e3136382e38372e31302031303230332074797020686f73740d0a613d63616e6469646174653a><rc 9><b 0x20322055445020><rd 10><b 0x203139322e3136382e38372e31302031303230342074797020686f73740d0a613d63727970746f3a31204145535f434d5f3132385f484d41435f534841315f383020696e6c696e653a><rc 11><b 0x0d0a0d0a> i2: <b 0x41434b2033323039333040766f6963652e676f6f676c652e636f6d205349502f322e300d0a5669613a205349502f322e302f554450203139322e3136382e38372e31303a31303230303b72706f72743b6272616e63683d><rc 41><b 0x0d0a4d61782d466f7277617264733a2037300d0a46726f6d3a202273702d31343422203c7369703a35393834393840766f6963652e676f6f676c652e636f6d3e3b7461673d><rd 32><b 0x0d0a546f3a203c7369703a33323039333040766f6963652e676f6f676c652e636f6d3e3b7461673d><rc 41><b 0x0d0a43616c6c2d49443a20><rd 32><b 0x0d0a435365713a2038373430><c><b 0x2041434b0d0a436f6e74656e742d4c656e6774683a20300d0a0d0a> i3: <b 0x494e564954452033323039333040766f6963652e676f6f676c652e636f6d205349502f322e300d0a5669613a205349502f322e302f554450203139322e3136382e38372e31303a31303230303b72706f72743b6272616e63683d><rc 41><b 0x0d0a4d61782d466f7277617264733a2037300d0a46726f6d3a202273702d31343422203c7369703a35393834393840766f6963652e676f6f676c652e636f6d3e3b7461673d><rd 32><b 0x0d0a546f3a203c7369703a33323039333040766f6963652e676f6f676c652e636f6d3e0d0a436f6e746163743a202273702d31343422203c7369703a353938343938403139322e3136382e38372e31303a31303230303b6f623e3b2b7369702e6963650d0a43616c6c2d49443a20><rd 32><b 0x0d0a435365713a2038373430><c><b 0x20494e564954450d0a416c6c6f773a20505241434b2c20494e564954452c2041434b2c204259452c2043414e43454c2c205550444154452c20494e464f2c205355425343524942452c204e4f544946592c2052454645522c204d4553534147452c204f5054494f4e530d0a537570706f727465643a207265706c616365732c2031303072656c2c2074696d65722c206e6f72656665727375620d0a53657373696f6e2d457870697265733a20313830300d0a4d696e2d53453a2039300d0a557365722d4167656e743a205349502f31332e312e320d0a417574686f72697a6174696f6e3a2044696765737420757365726e616d653d226e696b222c207265616c6d3d22617374657269736b222c206e6f6e63653d22><t><b 0x2f><rd 32><b 0x222c207572693d2233323039333040766f6963652e676f6f676c652e636f6d222c20726573706f6e73653d22><rd 32><b 0x222c20616c676f726974686d3d4d44352c20636e6f6e63653d22><rd 32><b 0x222c206f70617175653d22><rd 16><b 0x222c20716f703d617574682c206e633d30303030303030310d0a436f6e74656e742d547970653a206170706c69636174696f6e2f7364700d0a436f6e74656e742d4c656e6774683a203332300d0a0d0a763d300d0a6f3d2d20><rd 10><b 0x20><rd 10><b 0x20494e20495034203139322e3136382e38372e31300d0a733d706a6d656469610d0a623d41533a38340d0a743d3020300d0a613d582d6e61743a300d0a6d3d617564696f203130323033205254502f415650203138203820302033203130310d0a633d494e20495034203139322e3136382e38372e31300d0a623d544941533a36343030300d0a613d727463703a313032303420494e20495034203139322e3136382e38372e31300d0a613d73656e64726563760d0a613d7274706d61703a313820473732392f383030300d0a613d7274706d61703a332047534d2f383030300d0a613d666d74703a31303120302d31360d0a613d737372633a><rd 10><b 0x20636e616d653a><rd 16><b 0x0d0a613d6963652d75667261673a><rd 8><b 0x0d0a613d6963652d7077643a><rd 24><b 0x0d0a0d0a> ``` Upon calling `ifup awg0`, the `logread -f` command gives following messages before router hangs and goes into reboot: ``` user.notice amneziawg: info: using kernel-space kmod-amneziawg for /usr/bin/awg daemon.notice netifd: awg0 (9541): Unable to access interface: Message too large daemon.notice netifd: Interface 'awg0' is now up daemon.notice netifd: Network device 'awg0' link is up ``` The effect is consistent across all my routers.
Author
Owner

@nik-sie commented on GitHub (Mar 7, 2026):

There might be some limitations on i{n} parameters, however I couldn't find any in the documentation.

<!-- gh-comment-id:4017277249 --> @nik-sie commented on GitHub (Mar 7, 2026): There might be some limitations on `i{n}` parameters, however I couldn't find any in the [documentation](https://docs.amnezia.org/documentation/amnezia-wg/).
Author
Owner

@nik-sie commented on GitHub (Mar 11, 2026):

Might be related to #102, similar symptoms to #98

<!-- gh-comment-id:4042115256 --> @nik-sie commented on GitHub (Mar 11, 2026): Might be related to #102, similar symptoms to #98
Author
Owner

@rudenko-ks commented on GitHub (Aug 31, 2026):

This looks like a known-mechanism bug rather than anything specific to your
router. Your I1–I3 are several kilobytes decoded, and past a threshold the
device attributes leave no room for the first peer in the netlink dump. When
that happens wg_get_device_dump neither advances nor fails — it returns a
non-zero length, netlink asks again, and the same message is produced
indefinitely. The reader spins and grows; on a small router that is enough to
take the box down.

I have written it up with the code path and measurements here: .

Two details that match your report:

  • Unable to access interface: Message too large is the band just above the
    looping one. Slightly smaller I-values hang instead of erroring, which is
    worse — the error at least stops.
  • It can appear with no configuration change at all. The kernel writes a peer's
    endpoint at handshake, and that costs 20 bytes (IPv4) or 32 (IPv6) in the
    dump, so an interface that read fine can stop being readable once a client
    connects.

If you want the interface back without waiting for a fix: shorten I1–I3 so the
total stays under roughly 3.5 KB. The exact threshold depends on the interface
name length, whether a header-protection key is set, and the endpoint family —
the formula is in the linked issue.

<!-- gh-comment-id:5479535023 --> @rudenko-ks commented on GitHub (Aug 31, 2026): This looks like a known-mechanism bug rather than anything specific to your router. Your I1–I3 are several kilobytes decoded, and past a threshold the device attributes leave no room for the first peer in the netlink dump. When that happens `wg_get_device_dump` neither advances nor fails — it returns a non-zero length, netlink asks again, and the same message is produced indefinitely. The reader spins and grows; on a small router that is enough to take the box down. I have written it up with the code path and measurements here: <LINK TO NEW ISSUE>. Two details that match your report: - `Unable to access interface: Message too large` is the band just above the looping one. Slightly smaller I-values hang instead of erroring, which is worse — the error at least stops. - It can appear with no configuration change at all. The kernel writes a peer's endpoint at handshake, and that costs 20 bytes (IPv4) or 32 (IPv6) in the dump, so an interface that read fine can stop being readable once a client connects. If you want the interface back without waiting for a fix: shorten I1–I3 so the total stays under roughly 3.5 KB. The exact threshold depends on the interface name length, whether a header-protection key is set, and the endpoint family — the formula is in the linked issue.
Sign in to join this conversation.
No labels
pull-request
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
amnezia-vpn/amneziawg-linux-kernel-module#92
No description provided.