Skip to content
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

2.6.1: "Permission denied: '/home/username/.config'" on startup #4618

Open
Civil opened this issue Dec 25, 2024 · 1 comment · May be fixed by #4619
Open

2.6.1: "Permission denied: '/home/username/.config'" on startup #4618

Civil opened this issue Dec 25, 2024 · 1 comment · May be fixed by #4619

Comments

@Civil
Copy link

Civil commented Dec 25, 2024

Brief description

It seems that #4571 haven't fixed all the cases. One that is not handled - when scapy process don't have permissions to open the folder (e.x. script that calls scapy drops permissions and therefore home folder is no longer accessible).

In that case path.exists will throw an exception and scapy will crash.

Correct fix is to put if not path.exists() into same try-except block.

Scapy version

2.6.1

Python version

3.12

Operating system

Linux 6.12

Additional environment information

No response

How to reproduce

Install debian testing
Install scapy 2.6.1
Try running scapy server after dropping privilieges

Actual result

No response

Expected result

No response

Related resources

No response

@gpotter2
Copy link
Member

Hi. Thanks for the report.
Feel free to provide a PR.

Civil added a commit to Civil/scapy that referenced this issue Dec 25, 2024
If privileges for scapy were dropped, but username remain unchanged,
path.exist() would trigger an exception. Fix that by moving whole
if statement under try-except.

Fixes secdev#4618
Civil added a commit to Civil/scapy that referenced this issue Dec 25, 2024
If privileges for scapy were dropped, but username remain unchanged,
path.exist() would trigger an exception. Fix that by moving whole
if statement under try-except.

Fixes secdev#4618
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants