[patch] fix selinux OOM and memory leak

David Zeuthen david at fubar.dk
Tue Apr 12 15:13:56 PDT 2005


Hey,

I discovered a memory leak in the bus_selinux_allows_* functions when
stressing the bus and while fixing that I discovered that these
functions don't handle OOM. This is bad since it may lead to incorrect
accepts (on OOM) and is thus a security issue. 

Attached patch should fix that by requiring the caller of these
functions to cope with OOM. It also fixes the memory leaks I've been
seeing while valgrinding the system bus [1].

Cheers,
David

[1] : on Fedora Core Rawhide I had problems valgrinding the system bus;
I had to comment out the <user> tag so the bus runs as root. I think
this bug is not related to dbus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-selinux-error-handling-and-memory-leak.patch
Type: text/x-patch
Size: 10763 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20050412/9b06320a/fix-selinux-error-handling-and-memory-leak.bin


More information about the dbus mailing list