polkit-org / polkit

polkit (formerly PolicyKit) is a toolkit for defining and handling authorizations. It is used for allowing unprivileged processes to speak to privileged processes.
Other
51 stars 30 forks source link

Possible null dereference #478

Open VoroninArtemii opened 1 month ago

VoroninArtemii commented 1 month ago

There is a possible null dereference in this line. https://github.com/polkit-org/polkit/blob/7a1cff69b674dcbda0fbcdb3edf92f60ffb446ed/src/polkitbackend/polkitbackendsessionmonitor-systemd.c#L76 We check the variable callback before it but only write it to the logs if callback is NULL. https://github.com/polkit-org/polkit/blob/7a1cff69b674dcbda0fbcdb3edf92f60ffb446ed/src/polkitbackend/polkitbackendsessionmonitor-systemd.c#L74 Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE. Author A. Voronin.