/dev/urandom not included in chroot, leads to crashes with static key

Bug #1618363 reported by Robert Sander
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
network-manager-openvpn (Debian)
Fix Released
Unknown
network-manager-openvpn (Ubuntu)
Confirmed
High
Unassigned

Bug Description

I am trying to connect to an OpenVPN server with a static key and get these error messages in the logfile:

Aug 30 10:31:37 defiant nm-openvpn[11201]: RAND_bytes() failed
Aug 30 10:31:37 defiant nm-openvpn[11201]: Assertion failed at crypto.c:1386 (rand_bytes (output, len))
Aug 30 10:31:37 defiant nm-openvpn[11201]: Exiting due to fatal error

This looks like Debian bug #820554

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: network-manager-openvpn 1.1.93-1ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-36.55-generic 4.4.16
Uname: Linux 4.4.0-36-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: XFCE
Date: Tue Aug 30 10:37:43 2016
InstallationDate: Installed on 2012-06-14 (1537 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
SourcePackage: network-manager-openvpn
UpgradeStatus: Upgraded to xenial on 2016-08-30 (0 days ago)

Revision history for this message
Robert Sander (gurubert) wrote :
Revision history for this message
Robert Sander (gurubert) wrote :

Solution:

Create a directory /var/lib/openvpn/chroot/dev
Create device nodes for random and urandom within the chroot dev directory:

mknod random c 1 8
mknod urandom c 1 9

Changed in network-manager-openvpn (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager-openvpn (Ubuntu):
status: New → Confirmed
Revision history for this message
Luca Bellinzaghi (luca-bellinzaghi) wrote :

Solution proposed by Robert Sander has worked for me. Thank you.

Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial

Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

Does the entire system crash?

When answered please set status back to "confirmed". Thank you.

Changed in network-manager-openvpn (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Robert Sander (gurubert) wrote :

No, only the openvpn process crashes.

Changed in network-manager-openvpn (Ubuntu):
status: Incomplete → Confirmed
Changed in network-manager-openvpn (Ubuntu):
importance: Undecided → Medium
importance: Medium → High
Changed in network-manager-openvpn (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.