[systemd-devel] [PATCH 0/5] Coverity fixes

Thomas H.P. Andersen phomes at gmail.com
Mon Sep 15 22:56:18 PDT 2014


On Wed, Sep 10, 2014 at 11:20 AM,  <philippedeswert at gmail.com> wrote:
> From: Philippe De Swert <philippedeswert at gmail.com>
>
> Hi,
>
> Yesterday I finally got to revive the systemd Coverity project on
> scan.coverity.org Unfortunately to see the errors reported you need
> to sign up, but I will make sure to approve requests for seeing the
> "bugs" whenever they show up.

Hi Philippe,

I was wondering if it is possible to enable selinux for the scans? We
have a lot of reports of "Logically dead code". They are mostly due to
selinux_unit_access_check() being defined as
#define selinux_unit_access_check(unit, message, permission, error) 0
when HAVE_SELINUX is not set. See e.g. CID#1237573

I can of course just mark them as false positive but it would be
better to have those code paths covered as well.

> Also I quickly made some quick fixes (although since it was late at night
> yesterday there might be a few that were too quick ;) )
> There is a lot of work to do reviewing the error reports (as some are
> probably false positives) and fixing them. About 500 errors and an error
> defect density of 2.5 atm.
>
> Cheers,
>
> Philippe
>
> Philippe De Swert (5):
>   [use after free] Avoid using m->kdbus after freeing it.
>   [use after free] pattern is already freed, so do not dereference it in
>     the error print
>   [uninitialized] No need to check if num is < 0
>   [memleak] Do not leak mmapped area when other memory allocations fail.
>   [memleak] Actually unref the buscreds on failure.
>
>  src/journal/coredumpctl.c               |  4 ++--
>  src/journal/mmap-cache.c                | 10 +++++++---
>  src/libsystemd-terminal/idev-keyboard.c |  3 ---
>  src/libsystemd/sd-bus/bus-message.c     |  6 +++---
>  src/libsystemd/sd-bus/sd-bus.c          |  4 +++-
>  5 files changed, 15 insertions(+), 12 deletions(-)
>
> --
> 1.8.3.2
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel


More information about the systemd-devel mailing list