Page MenuHomePhabricator

wireguard kernel module not loading.
Closed, ResolvedPublicBUG

Description

msbone [9:41 AM]
yes modprobe: ERROR: could not insert 'wireguard': Invalid argument
hagbard [9:44 AM]
I have the august image, no issue. Very strange. exec: sudo bash to become root then do a 'grep wireguard /lib/modules/uname -r/modules.dep'
brb
msbone [9:45 AM]

root@vyos01:/home/vyos# grep wireguard /lib/modules/`uname -r`/modules.dep
extra/wireguard.ko: kernel/net/ipv6/ip6_udp_tunnel.ko kernel/net/ipv4/udp_tunnel.ko kernel/net/ipv6/ipv6.ko

hagbard [9:53 AM]
ok, so the module is there. (extra/wireguard.ko) Doe 'modinfo -v wireguard' show anything?
no -v just modinfo wireguard
msbone [9:55 AM]

root@vyos01:/home/vyos# modinfo wireguard
filename:       /lib/modules/4.18.4-amd64-vyos/extra/wireguard.ko
alias:          net-pf-16-proto-16-family-wireguard
alias:          rtnl-link-wireguard
version:        0.0.20180708-1
author:         Jason A. Donenfeld <Jason@zx2c4.com>
description:    Fast, secure, and modern VPN tunnel
license:        GPL v2
srcversion:     E818CD2CD2A19B21ACE83D1
depends:        ipv6,udp_tunnel,ip6_udp_tunnel
name:           wireguard
vermagic:       4.18.4-amd64-vyos SMP mod_unload modversions
root@vyos01:/home/vyos#

Details

Difficulty level
Unknown (require assessment)
Version
1.2.0
Why the issue appeared?
Will be filled on close
hagbard created this task.Sep 12 2018, 5:06 PM
hagbard claimed this task.

4954.412990] wireguard: loading module not compiled with retpoline compiler.

[ 4954.413080] wireguard: disagrees about version of symbol skb_put

[ 4954.413081] wireguard: Unknown symbol skb_put (err -22)

[ 4954.413085] wireguard: disagrees about version of symbol ip6_dst_hoplimit

[ 4954.413085] wireguard: Unknown symbol ip6_dst_hoplimit (err -22)

https://downloads.vyos.io/rolling/current/amd64/vyos-1.2.0-rolling%2B201809120337-amd64.iso seems to be a non-functional build. When I boot it from scratch it drops me only into initramfs. @msbone did an upgrade on hist system from 1.2.0-rolling+201808171757. I advised him to the use the is o from Sept. 10 which I tested for it's functionality. I see if I can find out what happened with the latest build. IT' a kernel module load issue I can reproduce already when booting the iso.

@msbone used the version I mentioned and confirmed functionality. We have to find out what's wrong with the kernel build https://ci.vyos.net/job/vyos-kernel/142/

c-po added a subscriber: c-po.Sep 12 2018, 9:11 PM

VyOS Kernel was rebuild with retpoline enabled https://phabricator.vyos.net/T819. As Kernel modules sometimes depend heavily on the unterlaying ABI (Application Binary Interface) this will break if the module is not rebuild.

Seems like I broke it. We should make vyos-wireguard a downstream jenkins peojekt to vyos-kernel so it is rebuild automatically.

Retpoline is a crucial change so extending the kernel module information (can be enabled in menuconfig) would not have covered this I think.

c-po added a comment.Sep 15 2018, 7:51 AM

Fixed:

$ show version
Version:          VyOS 1.2.0-rolling+201809150337
$ sudo modprobe wireguard
$ dmesg | tail -n 4
[   77.915285] systemd-sysv-generator[2934]: Overwriting existing symlink /run/systemd/generator.late/isc-dhcp-server.service with real service
[  174.154861] wireguard: loading out-of-tree module taints kernel.
[  174.158164] wireguard: WireGuard 0.0.20180708-1 loaded. See www.wireguard.com for information.
[  174.158166] wireguard: Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
c-po moved this task from Need Triage to Finished on the VyOS 1.2.x board.Sep 15 2018, 7:51 AM
c-po closed this task as Resolved.
c-po edited projects, added VyOS 1.2.x (VyOS 1.2.0-rc1); removed VyOS 1.2.x.