[Desktop-packages] [Bug 1959103] Re: polkitd crashes with segfault with specific config file

2023-09-01 Thread Ryan Friedman
I also have this bug on Ubuntu 22.04 following this guide, aside from setting 
it to my user.
https://code.luasoftware.com/tutorials/linux/ubuntu-prompt-system-policy-prevents-modification-of-network-settings-for-all-users


[Let all users modify system settings for network]
Identity=unix-user:ryan
Action=org.freedesktop.NetworkManager.settings.modify.system
ResultAny=no
ResultInactive=no
ResultActive=yes

Version: libpolkit-agent-1-0/jammy,now 0.105-33 amd64
[installed,automatic]

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to policykit-1 in Ubuntu.
https://bugs.launchpad.net/bugs/1959103

Title:
  polkitd crashes with segfault with specific config file

Status in policykit-1 package in Ubuntu:
  Confirmed

Bug description:
  The following config file in
  `/etc/polkit-1/localauthority.conf.d/02-allow-colord.conf` can cause a
  segfault in `polkitd`.

  ```
  polkit.addRule(function(action, subject) {
  if ((action.id == "org.freedesktop.color-manager.create-device" ||
  action.id == "org.freedesktop.color-manager.create-profile" ||
  action.id == "org.freedesktop.color-manager.delete-device" ||
  action.id == "org.freedesktop.color-manager.delete-profile" ||
  action.id == "org.freedesktop.color-manager.modify-device" ||
  action.id == "org.freedesktop.color-manager.modify-profile") &&
  subject.isInGroup("{group}")) {
  return polkit.Result.YES;
  }
  });
  ```

  1. As normal user: `systemctl restart cron.service`
  2. Error message `Failed to restart cron.service: Message recipient 
disconnected from message bus without replying`
  3. `dmesg` reports: 

  ```
 58.003893] polkitd[963]: segfault at 8 ip 558a96789856 sp 
7ffda31e45f0 error 4 in   polkitd[558a96784000+f000]
  [   58.003899] Code: 50 c7 ff ff 4d 89 e5 48 89 44 24 08 eb 53 66 0f 1f 44 00 
00 48 8b 44 24 10 48 89 e9 be 10 00 00 00 31 ff 48 8d 15 0b af 00 00 <4c> 8b 40 
08 31 c0 e8 af cb ff ff 48 8b 7c 24 10 e8 65 c9 ff ff 4c
  ``

  If you remove the 02-allow-colord.conf the segfault goes away and you
  are normally prompted for a password. You can also find a couple of
  references in the internet, e.g http://c-nergy.be/blog/?p=12043.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/policykit-1/+bug/1959103/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1959103] Re: polkitd crashes with segfault with specific config file

2023-01-16 Thread Ubuntu Foundations Team Bug Bot
The attachment "fix-config-error-handling.patch" seems to be a patch.
If it isn't, please remove the "patch" flag from the attachment, remove
the "patch" tag, and if you are a member of the ~ubuntu-reviewers,
unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issues please contact him.]

** Tags added: patch

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to policykit-1 in Ubuntu.
https://bugs.launchpad.net/bugs/1959103

Title:
  polkitd crashes with segfault with specific config file

Status in policykit-1 package in Ubuntu:
  Confirmed

Bug description:
  The following config file in
  `/etc/polkit-1/localauthority.conf.d/02-allow-colord.conf` can cause a
  segfault in `polkitd`.

  ```
  polkit.addRule(function(action, subject) {
  if ((action.id == "org.freedesktop.color-manager.create-device" ||
  action.id == "org.freedesktop.color-manager.create-profile" ||
  action.id == "org.freedesktop.color-manager.delete-device" ||
  action.id == "org.freedesktop.color-manager.delete-profile" ||
  action.id == "org.freedesktop.color-manager.modify-device" ||
  action.id == "org.freedesktop.color-manager.modify-profile") &&
  subject.isInGroup("{group}")) {
  return polkit.Result.YES;
  }
  });
  ```

  1. As normal user: `systemctl restart cron.service`
  2. Error message `Failed to restart cron.service: Message recipient 
disconnected from message bus without replying`
  3. `dmesg` reports: 

  ```
 58.003893] polkitd[963]: segfault at 8 ip 558a96789856 sp 
7ffda31e45f0 error 4 in   polkitd[558a96784000+f000]
  [   58.003899] Code: 50 c7 ff ff 4d 89 e5 48 89 44 24 08 eb 53 66 0f 1f 44 00 
00 48 8b 44 24 10 48 89 e9 be 10 00 00 00 31 ff 48 8d 15 0b af 00 00 <4c> 8b 40 
08 31 c0 e8 af cb ff ff 48 8b 7c 24 10 e8 65 c9 ff ff 4c
  ``

  If you remove the 02-allow-colord.conf the segfault goes away and you
  are normally prompted for a password. You can also find a couple of
  references in the internet, e.g http://c-nergy.be/blog/?p=12043.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/policykit-1/+bug/1959103/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1959103] Re: polkitd crashes with segfault with specific config file

2023-01-16 Thread Lukasz Klimek
I had similar issue with the following config:

[steam-network-perm]
Identity unix-user:gry
Action org.freedesktop.NetworkManager.settings.modify.system
ResultActive no
ResultInactive no
ResultAny no


This is due to some programming bug when handling config files. Attached patch 
fixes the issue for me.

** Patch added: "fix-config-error-handling.patch"
   
https://bugs.launchpad.net/ubuntu/+source/policykit-1/+bug/1959103/+attachment/5641584/+files/fix-config-error-handling.patch

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to policykit-1 in Ubuntu.
https://bugs.launchpad.net/bugs/1959103

Title:
  polkitd crashes with segfault with specific config file

Status in policykit-1 package in Ubuntu:
  Confirmed

Bug description:
  The following config file in
  `/etc/polkit-1/localauthority.conf.d/02-allow-colord.conf` can cause a
  segfault in `polkitd`.

  ```
  polkit.addRule(function(action, subject) {
  if ((action.id == "org.freedesktop.color-manager.create-device" ||
  action.id == "org.freedesktop.color-manager.create-profile" ||
  action.id == "org.freedesktop.color-manager.delete-device" ||
  action.id == "org.freedesktop.color-manager.delete-profile" ||
  action.id == "org.freedesktop.color-manager.modify-device" ||
  action.id == "org.freedesktop.color-manager.modify-profile") &&
  subject.isInGroup("{group}")) {
  return polkit.Result.YES;
  }
  });
  ```

  1. As normal user: `systemctl restart cron.service`
  2. Error message `Failed to restart cron.service: Message recipient 
disconnected from message bus without replying`
  3. `dmesg` reports: 

  ```
 58.003893] polkitd[963]: segfault at 8 ip 558a96789856 sp 
7ffda31e45f0 error 4 in   polkitd[558a96784000+f000]
  [   58.003899] Code: 50 c7 ff ff 4d 89 e5 48 89 44 24 08 eb 53 66 0f 1f 44 00 
00 48 8b 44 24 10 48 89 e9 be 10 00 00 00 31 ff 48 8d 15 0b af 00 00 <4c> 8b 40 
08 31 c0 e8 af cb ff ff 48 8b 7c 24 10 e8 65 c9 ff ff 4c
  ``

  If you remove the 02-allow-colord.conf the segfault goes away and you
  are normally prompted for a password. You can also find a couple of
  references in the internet, e.g http://c-nergy.be/blog/?p=12043.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/policykit-1/+bug/1959103/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1959103] Re: polkitd crashes with segfault with specific config file

2022-07-22 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: policykit-1 (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to policykit-1 in Ubuntu.
https://bugs.launchpad.net/bugs/1959103

Title:
  polkitd crashes with segfault with specific config file

Status in policykit-1 package in Ubuntu:
  Confirmed

Bug description:
  The following config file in
  `/etc/polkit-1/localauthority.conf.d/02-allow-colord.conf` can cause a
  segfault in `polkitd`.

  ```
  polkit.addRule(function(action, subject) {
  if ((action.id == "org.freedesktop.color-manager.create-device" ||
  action.id == "org.freedesktop.color-manager.create-profile" ||
  action.id == "org.freedesktop.color-manager.delete-device" ||
  action.id == "org.freedesktop.color-manager.delete-profile" ||
  action.id == "org.freedesktop.color-manager.modify-device" ||
  action.id == "org.freedesktop.color-manager.modify-profile") &&
  subject.isInGroup("{group}")) {
  return polkit.Result.YES;
  }
  });
  ```

  1. As normal user: `systemctl restart cron.service`
  2. Error message `Failed to restart cron.service: Message recipient 
disconnected from message bus without replying`
  3. `dmesg` reports: 

  ```
 58.003893] polkitd[963]: segfault at 8 ip 558a96789856 sp 
7ffda31e45f0 error 4 in   polkitd[558a96784000+f000]
  [   58.003899] Code: 50 c7 ff ff 4d 89 e5 48 89 44 24 08 eb 53 66 0f 1f 44 00 
00 48 8b 44 24 10 48 89 e9 be 10 00 00 00 31 ff 48 8d 15 0b af 00 00 <4c> 8b 40 
08 31 c0 e8 af cb ff ff 48 8b 7c 24 10 e8 65 c9 ff ff 4c
  ``

  If you remove the 02-allow-colord.conf the segfault goes away and you
  are normally prompted for a password. You can also find a couple of
  references in the internet, e.g http://c-nergy.be/blog/?p=12043.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/policykit-1/+bug/1959103/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp