Skip to content

cups: fix @ACL and @OWNER access checks in cupsdGetPrivateAttrs - #1814

Open
user-Param wants to merge 2 commits into
OpenPrinting:masterfrom
user-Param:master
Open

user-Param wants to merge 2 commits into
OpenPrinting:masterfrom
user-Param:master

Conversation

@user-Param

Copy link
Copy Markdown

Fixes #1796

Fix two access control bugs in cupsdGetPrivateAttrs():

  1. @acl: When the requester matches an ACL entry, the inner loop broke
    but control fell through to the end of the function, returning the
    private-attribute list (denying access) instead of NULL (granting
    access). Now returns NULL on match and continues to the next entry
    on non-match, preventing fall-through to the generic '@' case.

  2. @owner: A non-owner who belongs to an OS group named OWNER could
    bypass the owner check because @owner reached the generic '@' group
    lookup branch. Now @acl, @owner, and @System are excluded from the
    generic '@' branch.

Signed-off-by: user-Param user-Param@users.noreply.github.com

melon tusk added 2 commits November 12, 2026 11:27
Fix two access control bugs in cupsdGetPrivateAttrs():

1. @acl: When the requester matches an ACL entry, the inner loop broke
   but control fell through to the end of the function, returning the
   private-attribute list (denying access) instead of NULL (granting
   access). Now returns NULL on match and continues to the next entry
   on non-match, preventing fall-through to the generic '@' case.

2. @owner: A non-owner who belongs to an OS group named OWNER could
   bypass the owner check because @owner reached the generic '@' group
   lookup branch. Now @acl, @owner, and @System are excluded from the
   generic '@' branch.

Signed-off-by: user-Param <user-Param@users.noreply.github.com>
Signed-off-by: melon tusk <paramjeetsingh.dev.mail@gmail.com>
When a printer has a quota but an empty allowed-user list, the bearer
auth path at add_job() reached the comparison (name != NULL) ==
p->deny_users with name==NULL and deny_users==false, denying every
OAuth user. Guard the comparison with cupsArrayCount(p->users) > 0,
matching the non-bearer branch at line 3916.

Fixes OpenPrinting#1795

Signed-off-by: melon tusk <paramjeetsingh.dev.mail@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cupsdGetPrivateAttrs: @ACL never grants access, and @OWNER is looked up as an operating-system group for non-owners

1 participant