-
-
Notifications
You must be signed in to change notification settings - Fork 964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
freebsd bug veracrypt not able to create a basic file container volume #1446
Comments
I wonder if I am experiencing the same issue from a different angle. If I run veracrypt as a user, both GUI or text interface, and As an example, the command line is: If I run the above command with sudo, that works perfectly, ex: veracrypt, under the hood, invoke sudo to process the actual mount command. I used truss and the command that fails seems to be: With the following problem: I use ZFS, but the filesystem has setuid attribute activated by default
And that is also confirmed by the fact I can run sudo in other contexts without problems. @justanotherscript can you check with truss if you have the same problem please? P.S. Not sure mine is actually a veracrypt bug, but I can't understand what I am doing wrong. |
@tarastella thanks for the idea i tried the same as described above this time with the veracrypt gui port. And there the exact error is being shown except this time it doesnt even ask me for a sudo password like before, but just shows me the error "Not enough data available". Just to make it clear before you answered I installed veracrypt with "pkg install veracrypt" and now I also tried it with "cd /usr/ports/security/veracrypt/ && make install clean". I will also provide as above the screenshots of the behavior of the port package. |
I know FreeBSD might not be the biggest priority, but maybe you can take a look at it when you get a chance. Thank you in advance @idrassi |
Out of curiosity @justanotherscript, can you run through the process with sudo (if you haven't already)? |
When I ran the package the whole time as root the error doesn't occurs (but the thing here that the package seems to be a more recent version than the ports version at least in this case ). In the most recent version the error should have been fixed to escalate the privileges without the need to start it from beginning with sudo. The screenshots are from the prebuild binary package: ![error_not_appearing_run_as_root](https://github.com/user-attachment |
As we're in the realm of curiosity, and to understand if my issue is the same as yours, can you please run this command as a user please?
and reproduce the error. Then attach here the vera.out. |
|
Hey @justanotherscript! Thanks for sharing. I have limited capabilities when it comes to programming, but looking at your trace, I have the feeling we share the same privilege elevation issue:
I've also tried to read the source code of Veracrypt, and, with my limited knowledge, I am not totally sure that this is purely related to Veracrypt itself. It seems that the sudo suid bit is somehow ignored. In my case, I'm sure that the suid bit is working, and the filesystem has suid allowed. I've also tried to post a message in the FreeBSD forum, but nothing so far. [edit] I forgot to mention that I might have tracked it down to this call of line 416: VeraCrypt/src/Core/Unix/CoreService.cpp Line 286 in 3bb5184
const char *args[] = { "sudo", "-S", "-p", "", appPath.c_str(), TC_CORE_SERVICE_CMDLINE_OPTION, nullptr }; |
I might need to apologise. that strace is calling a variant of exec() that does not honour the suid for security reasons. So, what I wrote so far, i.e., receiving the message "effective uid is not 0" from the elevation of VeraCrypt might be due to me using truss itself, and it might be unrelated to the actual issue that returns "Not enough data." I tried to help, but I might have steered the conversation in the wrong direction. At this point, I'm happy to follow any direction to help troubleshoot this. |
Don't worry too much you have already helped a lot and tried to find the cause. When the time comes, core developers will certainly address the issue. In any case, thank you for your time and effort. |
Expected behavior
Changes between 1.26.7 and1.26.14 not all but to describe the error (25 August 2024) :
FreeBSD:
Fix privilege escalation prompts not showing up (GH #1349)
Support automatic detection and mounting of ext2/3/4, exFAT, NTFS filesystems (GH #1350)
Use correct Disk Utility location when "check filesystem" is ran (GH #1273)
Observed behavior
privilege escalation prompts are appearing for example when trying to create a a basic file container volume but after typing in the correct sudo password "Not enough data available" appears as error.
Steps to reproduce
creating a new veracrypt basic/ standard file container volume
Screenshots
Your Environment
Please tell us more about your environment
VeraCrypt version: veracrypt-1.26.15 (freebsd package)
Operating system and version: FreeBSD-14.1-RELEASE
System type: 64-bit amd64
The text was updated successfully, but these errors were encountered: