Skip to content

Conversation

@bjorn3
Copy link
Collaborator

@bjorn3 bjorn3 commented Oct 10, 2025

Previously this would panic as the parent process expected the monitor process to have alreqady broken out of the event loop before sending back an error message. Which then resulted in an edge monitor message, which is only expected to be received outside the event loop, causing a panic. By using set_break we still cause the error to be sent to the parent process, while ensuring that we are no longer inside the event loop of the monitor when doing so.

Previously this would panic as the parent process expected the monitor
process to have alreqady broken out of the event loop before sending
back an error message. Which then resulted in an edge monitor message,
which is only expected to be received outside the event loop, causing a
panic. By using set_break we still cause the error to be sent to the
parent process, while ensuring that we are no longer inside the event
loop of the monitor when doing so.
@bjorn3 bjorn3 requested a review from rnijveld October 10, 2025 09:27
@bjorn3 bjorn3 enabled auto-merge October 10, 2025 09:41
Copy link
Contributor

@marlonbaeten marlonbaeten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have verified this fixes the bug using:

docker run --rm -it ubuntu:25.10 bash -lc '
apt update
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y git tzdata libpam0g-dev cargo sudo
git clone https://github.com/trifectatechfoundation/sudo-rs.git
cd sudo-rs
cargo build --release
chmod +xs target/release/sudo
target/release/sudo /tmp
git remote add bjorn3 https://github.com/bjorn3/sudo-rs.git
git fetch bjorn3
git checkout fix_exec_fail_panic
cargo build --release
chmod +xs target/release/sudo
target/release/sudo /tmp
'

@bjorn3 bjorn3 merged commit e226d20 into trifectatechfoundation:main Oct 10, 2025
17 checks passed
@squell squell requested review from squell and removed request for rnijveld and squell October 20, 2025 11:41
@bjorn3 bjorn3 deleted the fix_exec_fail_panic branch October 20, 2025 12:58
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 this pull request may close these issues.

2 participants