mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-18 01:20:43 +01:00
security: Revert behavior of extension access for compatibility.
Previously, three extensions were defined as "trusted" by the extension: BIG-REQUESTS, XC-MISC, and XPrint. No other extensions were permitted to be used by untrusted clients. In commit8b5d21cc1dthis was changed for some reason. Return to the old, compatible behavior. (cherry picked from commit6045506be0)
This commit is contained in:
parent
4970d757a7
commit
62aa06d499
1 changed files with 16 additions and 14 deletions
|
|
@ -63,10 +63,10 @@ typedef struct {
|
|||
} SecurityStateRec;
|
||||
|
||||
/* Extensions that untrusted clients shouldn't have access to */
|
||||
static char *SecurityUntrustedExtensions[] = {
|
||||
"RandR",
|
||||
"SECURITY",
|
||||
"XFree86-DGA",
|
||||
static char *SecurityTrustedExtensions[] = {
|
||||
"XC-MISC",
|
||||
"BIG-REQUESTS",
|
||||
"XpExtension",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
@ -859,16 +859,18 @@ SecurityExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
|||
|
||||
subj = dixLookupPrivate(&rec->client->devPrivates, stateKey);
|
||||
|
||||
if (subj->haveState && subj->trustLevel != XSecurityClientTrusted)
|
||||
while (SecurityUntrustedExtensions[i])
|
||||
if (!strcmp(SecurityUntrustedExtensions[i++], rec->ext->name)) {
|
||||
SecurityAudit("Security: denied client %d access to extension "
|
||||
"%s on request %s\n",
|
||||
rec->client->index, rec->ext->name,
|
||||
SecurityLookupRequestName(rec->client));
|
||||
rec->status = BadAccess;
|
||||
return;
|
||||
}
|
||||
if (subj->haveState && subj->trustLevel == XSecurityClientTrusted)
|
||||
return;
|
||||
|
||||
while (SecurityTrustedExtensions[i])
|
||||
if (!strcmp(SecurityTrustedExtensions[i++], rec->ext->name))
|
||||
return;
|
||||
|
||||
SecurityAudit("Security: denied client %d access to extension "
|
||||
"%s on request %s\n",
|
||||
rec->client->index, rec->ext->name,
|
||||
SecurityLookupRequestName(rec->client));
|
||||
rec->status = BadAccess;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue