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
68 stars 32 forks source link

trivial bug in polkit_agent_session_response() #187

Closed polkit-github-migration-bot closed 10 months ago

polkit-github-migration-bot commented 1 year ago

In gitlab.freedesktop.org by lis on Feb 11, 2023, 10:51

Link to the original issue: https://gitlab.freedesktop.org/polkit/polkit/-/issues/186 While reading the code to find out what's happening on the interface to the setuid helper, I found this:

    response_len = strlen (response);

    add_newline = (response[response_len] != '\n');

which will always set add_newline to TRUE, since it's actually comparing to the nul terminator byte rather than (as likely intended) the last character in the string.

I don't think there's any security implication, but it's definitely a bug.

polkit-github-migration-bot commented 1 year ago

In gitlab.freedesktop.org by vmihalko on Mar 28, 2023, 17:19

created branch 186-trivial-bug-in-polkit_agent_session_response to address this issue

polkit-github-migration-bot commented 1 year ago

In gitlab.freedesktop.org by vmihalko on Mar 29, 2023, 15:04

mentioned in commit vmihalko/polkit@a58f72c618f09e1fdf3125a1cf782531c3a6511c

polkit-github-migration-bot commented 1 year ago

In gitlab.freedesktop.org by vmihalko on Apr 5, 2023, 14:34

mentioned in commit vmihalko/polkit@0ccbaba09607e9e2ef2831b6a04183c6355096b9