Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#73694 - vde2 update to -19 breaks vde_cryptcab

Attached to Project: Arch Linux
Opened by Ede Wolf (EdeWolf) - Wednesday, 09 February 2022, 08:13 GMT
Last edited by Antonio Rojas (arojas) - Wednesday, 16 February 2022, 18:11 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Evangelos Foutras (foutrelis)
Antonio Rojas (arojas)
Felix Yan (felixonmars)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

After update from 2.3.2-18 to 2.3.2-19, the clientside of vde_cryptcab fails to build up a tunnel with some strage blowfish error:

vde_cryptcab[9113]: Using pre-shared key /home/vde/vpn.key
vde_cryptcab[9113]: vde_cryptcab: Verbosity: 3
vde_cryptcab[9113]: vde_cryptcab: Using pre-shared key /home/vde/18.key
vde_cryptcab[9115]: vde_cryptcab: Reading pre-shared Blowfish key...
vde_cryptcab[9115]: blowfish.key creat error: File exists
vde_cryptcab[9115]: Couldn't create the secret key.

Command used:
/usr/bin/vde_cryptcab -k -c user@example.com:7654 -s /run/vde/vpn.ctl -p 7653 -P /home/vde/vpn.key -vvv

Tried different keys, created in a different manner, no change.

Interestingly, using -x (disable symmetric encryption) instead of -P does not change the behaviour:

# /usr/bin/vde_cryptcab -k -c user@example.com:7654 -s /run/vde/vpn.ctl -p 7653 -x -vvv
vde_cryptcab: Verbosity: 3
vde_cryptcab: Encryption Disabled.
vde_cryptcab: Encryption Disabled.
vde_cryptcab: Generating Blowfish key...
blowfish.key creat error: File exists
Couldn't create the secret key.

On the server side, despite -vvv logging, there are no entries logged, so it seems to be a client only issue.

Reproduction:
Reverting back to 2.3.2-18 and everything works again. The switch from -18 to -19 and back can be repeated with consistent results. -18 works, -19 does not. On the server side, the update made no problem.
This task depends upon

Closed by  Antonio Rojas (arojas)
Wednesday, 16 February 2022, 18:11 GMT
Reason for closing:  Fixed
Additional comments about closing:  vde2 2.3.2-20
Comment by Ede Wolf (EdeWolf) - Wednesday, 09 February 2022, 08:36 GMT
strace reveals the problem. It is an existing /tmp/.blowfish.key. Once that key is removed, the connection buildup works. However it is unclear, what process does create this file and it has to be removed every time before each subsequent buildup of the tunnel. So with -19, every time before calling vde_cryptcab one has to remove the /tmp/.blowfish file. Not sure, what would happen with multiple tunnels.

bind(3, {sa_family=AF_INET, sin_port=htons(7653), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
write(2, "vde_cryptcab: ", 14vde_cryptcab: ) = 14
write(2, "Generating Blowfish key...", 26Generating Blowfish key...) = 26
write(2, "\n", 1
) = 1
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 4
read(4, "\6\365\321\246\237`\230\211Qq\320\201\336\223\310\1", 16) = 16
read(4, "\350J@\307\327\202_z", 8) = 8
read(4, "\32", 1) = 1
read(4, "K", 1) = 1
read(4, "\371", 1) = 1
read(4, "\222", 1) = 1
read(4, "C", 1) = 1
read(4, "\266", 1) = 1
read(4, "\345", 1) = 1
read(4, "\313", 1) = 1
read(4, "H", 1) = 1
read(4, "\323", 1) = 1
read(4, "\323", 1) = 1
read(4, "k", 1) = 1
read(4, "J", 1) = 1
read(4, "\17", 1) = 1
read(4, "1", 1) = 1
close(4) = 0
openat(AT_FDCWD, "/tmp/.blowfish.key", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0600) = -1 EEXIST (Die Datei existiert bereits)
write(2, "blowfish.key creat error: File e"..., 38blowfish.key creat error: File exists
) = 38
close(4) = -1 EBADF (Ungültiger Dateideskriptor)
write(2, "Couldn't create the secret key.\n", 32Couldn't create the secret key.
Comment by Antonio Rojas (arojas) - Tuesday, 15 February 2022, 21:30 GMT
Please test 2.3.2-20
Comment by Ede Wolf (EdeWolf) - Wednesday, 16 February 2022, 18:05 GMT
2.3.2-20 seems to work fine again sofar. Thanks

Loading...