-
Notifications
You must be signed in to change notification settings - Fork 10
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
Make it easier to integrate dfuzzer into CI #20
Comments
I reported that bug in avahi/avahi#375 |
@mrc0mmand FWIW dbus-broker-launch[2660]: dbus-broker: ../src/util/user.c:195: user_free: Assertion `c_assert_result && "c_rbtree_is_empty(&user->usage_tree)"' failed
It wasn't triggered by any dbus method in particular. It just crashed when it was stopped/reloaded by |
@mrc0mmand FYI Looks like |
Looks like it was reported yesterday in bus1/dbus-broker#288 and fixed in bus1/dbus-broker@608b259 |
There are memory leaks there bus1/dbus-broker#289 and it crashes from time to time https://github.com/matusmarhefka/dfuzzer/issues/20#issuecomment-1114097840 so let's just skip it by analogy with dbus-daemon to avoid reports that have nothing to do with systemd itself. It's kind of a part of systemd#22547
There are memory leaks there bus1/dbus-broker#289 and it crashes from time to time https://github.com/matusmarhefka/dfuzzer/issues/20#issuecomment-1114097840 so let's just skip it by analogy with dbus-daemon to avoid reports that have nothing to do with systemd itself. It's kind of a part of #22547
There are memory leaks there bus1/dbus-broker#289 and it crashes from time to time https://github.com/matusmarhefka/dfuzzer/issues/20#issuecomment-1114097840 so let's just skip it by analogy with dbus-daemon to avoid reports that have nothing to do with systemd itself. It's kind of a part of systemd/systemd#22547 (cherry picked from commit d0880fa)
There are memory leaks there bus1/dbus-broker#289 and it crashes from time to time https://github.com/matusmarhefka/dfuzzer/issues/20#issuecomment-1114097840 so let's just skip it by analogy with dbus-daemon to avoid reports that have nothing to do with systemd itself. It's kind of a part of systemd/systemd#22547 (cherry picked from commit d0880fa) Related: #2087652
There are memory leaks there bus1/dbus-broker#289 and it crashes from time to time https://github.com/matusmarhefka/dfuzzer/issues/20#issuecomment-1114097840 so let's just skip it by analogy with dbus-daemon to avoid reports that have nothing to do with systemd itself. It's kind of a part of systemd/systemd#22547 (cherry picked from commit d0880fa) Related: #2087652
There are memory leaks there bus1/dbus-broker#289 and it crashes from time to time https://github.com/matusmarhefka/dfuzzer/issues/20#issuecomment-1114097840 so let's just skip it by analogy with dbus-daemon to avoid reports that have nothing to do with systemd itself. It's kind of a part of systemd/systemd#22547 (cherry picked from commit d0880fa) Related: #2087652
@mrc0mmand I'm not sure if you're planning to extend dfuzzer but it would probably be interesting to try to figure out how to get it to discover stuff like avahi/avahi#455, avahi/avahi#454, avahi/avahi#453 and avahi/avahi#451. avahi/avahi#452 is a bit different in the sense that that particular method is somewhat hidden and can't be discovered by dfuzzer. (BTW |
Hah, that's indeed interesting, I'll definitely look into that, thanks for the links. |
FWIW Sending big-endian messages on little-endian machines (and vice versa) is interesting too: https://gitlab.freedesktop.org/dbus/dbus/-/issues/417 :-) That would be involved though. |
Oh well, this reminds me of a pitfall I ran into when playing around with a potential "vfuzzer" (systemd/systemd#23785 (comment)) which is the (sad) reality that the quality of the introspection data depends on the bus' willingness to put the necessary stuff together. In Avahi's case, however, this is a bit more complicated, since the objects seem to be tied to a specific peer, or at least that's what I got from a dbus capture. For example, creating a new EntryGroup
emits
where
since we have a different ID:
i.e. now "we" are However, if I create a simple python script, that uses one bus connection for both calls, I get the expected result: #!/bin/python3
from pydbus import SystemBus
bus = SystemBus()
avahi = bus.get("org.freedesktop.Avahi", "/")
obj_name = avahi.EntryGroupNew()
print(obj_name)
obj = bus.get("org.freedesktop.Avahi", obj_name)
print(obj.IsEmpty())
So, uh, yeah, this makes things slightly more complicated :) |
And to expand on the introspection stuff - for example, in systemd, we append a list of child nodes to the introspection data when generating the response [0]. However, Avahi serves a static XML for introspection requests [1][2][...] so even if we somehow managed to deal with the peer-related stuff above, the object still wouldn't be "automagically" discoverable. [0] https://github.com/systemd/systemd/blob/main/src/libsystemd/sd-bus/bus-introspect.c#L113 |
Unless systemd tries to hide something: systemd/systemd@fb22861 :-) Seriously though I think the problem is that for those nodes to be generated |
Hah, that one slipped past me. And I can't even run dfuzzer on it, since we always do an introspection, which, of course, doesn't work here:
Maybe we should just run in a "one-shot" mode if we get a full bus quadruplet (i.e. bus, object, interface, method).
Given the systemd case I though about adding something like "user-guided" mode to dfuzzer, where you would use a file containing quadruplets (bus, object, interface, method) to guide dfuzzer which methods to fuzz, to possibly cover these corner cases. But apart from it being way too manual, it still wouldn't work for Avahi, since even though we would use one bus for all calls, the object name is still dynamic, sigh. |
I think it makes sense in the sense that it shouldn't be necessary to call
I think it should help but it seems that there should be a way to go further than that by making it possible to lead
Agreed. |
To judge from https://bugs.launchpad.net/ubuntu/+source/dbus-broker/+bug/2015538/comments/6 the Ubuntu folks took it to the next level. I guess at some point it should be documented that to test stuff on Ubuntu the AppArmor stuff should be relaxed a bit to actually fuzz stuff there (instead of testing whether AppArmor confines things properly). |
It was briefly discussed in https://github.com/matusmarhefka/dfuzzer/pull/13#issuecomment-1092258508
I think in general
dfuzzer
isn't ready to be integrated into CI due to some limitations like https://github.com/matusmarhefka/dfuzzer/issues/19 but given that it's capable of discovering crashes likein less than 5 seconds even without ASan or Valgrind I think it should be possible to utilize it in its current form.
The text was updated successfully, but these errors were encountered: