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

dfuzzer: bail out on any D-Bus error while traversing the tree #100

Merged
merged 2 commits into from
May 20, 2022

Conversation

mrc0mmand
Copy link
Member

Also, simplify the D-Bus error handling by always dumping the remote
error code.

Resolves: #98

mrc0mmand added 2 commits May 20, 2022 14:26
Also, simplify the D-Bus error handling by always dumping the remote
error code.

Resolves: dbus-fuzzer#98
…ecified

Either traverse just the subtree or call the interface directly - if it
doesn't exist, dfuzzer should handle this gracefully anyway and return
the corresponding error.

Resolves: dbus-fuzzer#99
@mrc0mmand mrc0mmand linked an issue May 20, 2022 that may be closed by this pull request
@mrc0mmand
Copy link
Member Author

@evverx this should, hopefully, address both #98 and #99:

$ build/dfuzzer -v -n org.freedesktop.portable1 -o /org/freedesktop/portable1/image
Cannot open suppression file './dfuzzer.conf'
Cannot open suppression file '/home/fsumsal/.dfuzzer.conf'
Loading suppressions from file '/etc/dfuzzer.conf'
[SESSION BUS]
Error while activating 'org.freedesktop.portable1': The name is not activatable.
Error while calling method 'GetConnectionUnixProcessID': GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: The connection does not exist
Couldn't get the PID of the tested process
[SYSTEM BUS]
[PROCESS: /usr/lib/systemd/systemd-portabled]
[CONNECTED TO PID: 3073356]
Object: /org/freedesktop/portable1/image
Error while calling method 'Introspect': GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Expected image name, not path in place of ''.
Exit status: 1
$ build/dfuzzer -v -n org.freedesktop.portable1 -o /org/freedesktop/portable1/image/aaaaa
Cannot open suppression file './dfuzzer.conf'
Cannot open suppression file '/home/fsumsal/.dfuzzer.conf'
Loading suppressions from file '/etc/dfuzzer.conf'
[SESSION BUS]
Error while activating 'org.freedesktop.portable1': The name is not activatable.
Error while calling method 'GetConnectionUnixProcessID': GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: The connection does not exist
Couldn't get the PID of the tested process
[SYSTEM BUS]
[PROCESS: /usr/lib/systemd/systemd-portabled]
[CONNECTED TO PID: 3073459]
Object: /org/freedesktop/portable1/image/aaaaa
Error while calling method 'Introspect': GDBus.Error:org.freedesktop.portable1.NoSuchImage: No image 'aaaaa' found.
Exit status: 1

@mrc0mmand mrc0mmand marked this pull request as ready for review May 20, 2022 12:48
Copy link
Member

@evverx evverx left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@evverx evverx merged commit 456d80b into dbus-fuzzer:master May 20, 2022
@mrc0mmand mrc0mmand deleted the traversing-fixes branch May 20, 2022 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants