Bug #121914 PROCESS-less event_scheduler account may see scheduler daemon row

Submitted: 24 Nov 23:12
Reporter: QiFan Liu Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S3 (Non-critical)
Version:26.10.0 OS:Linux
Assigned to: CPU Architecture:x86
Tags: event_scheduler, performance_schema.processlist, Process

[24 Nov 23:12] QiFan Liu
Description:
A user without PROCESS should see only its own processlist rows. A suspected username collision may allow an authenticated account named event_scheduler to see the separate event-scheduler Daemon row because that row is also displayed with USER='event_scheduler'.

This case was run against MySQL 26.10.0 (Docker image registry-1.docker.io/library/mysql@sha256:3819b2b23835c4a73c8b022fafc33c8095c0f81c929a8b7a84613d2fba6c52f5) on linux/amd64.

The ordinary scoped account used in that run could not see the scheduler row without PROCESS. However, its privilege username was not literally event_scheduler, and the required reconnect as that identity could not be run there. Therefore the suspected collision was not reached and the result remains inconclusive.

How to repeat:
1. As root, enable the scheduler and create the account:

SET GLOBAL event_scheduler = ON;
DROP USER IF EXISTS 'event_scheduler'@'localhost';
CREATE USER 'event_scheduler'@'localhost' IDENTIFIED BY 'test_password';
GRANT SELECT ON performance_schema.processlist TO 'event_scheduler'@'localhost';

2. Reconnect as event_scheduler without PROCESS. Wait up to 10 seconds for the event-scheduler daemon to start, running the SELECT COUNT(*) query below once per second until it returns a nonzero count or the timeout expires:

SHOW GRANTS;
SELECT COUNT(*)
FROM performance_schema.processlist
WHERE USER = 'event_scheduler'
  AND COMMAND = 'Daemon'
  AND ID <> CONNECTION_ID();

Expected: 0, because an account without PROCESS may inspect only its own processlist rows.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.