漏洞标题
sched_ext: 在scx_ops_bypass()中用raw_spin_rq_lock()替换rq_lock()
漏洞描述信息
在Linux内核中,已修复以下漏洞:
sched_ext: 在scx_ops_bypass()中将rq_lock()替换为raw_spin_rq_lock()
scx_ops_bypass()遍历所有CPU以重新入队所有scx任务。对于每个CPU,无论该CPU是否已下线或当前是否在更高优先级的调度类(例如截止时间)中运行任务,它都会使用rq_lock()获取锁。rq_lock()应仅用于在线CPU,而rq_lock()的使用可能会在rq_pin_lock()中触发不必要的警告。因此,在scx_ops_bypass()中将rq_lock()替换为raw_spin_rq_lock()。
如果没有此更改,将会观察到以下警告:
===== START =====
[ 6.615205] rq->balance_callback && rq->balance_callback != &balance_push_callback
[ 6.615208] WARNING: CPU: 2 PID: 0 at kernel/sched/sched.h:1730 __schedule+0x1130/0x1c90
===== END =====
CVSS信息
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:N
漏洞类别
加锁机制不恰当
漏洞标题
sched_ext: Replace rq_lock() to raw_spin_rq_lock() in scx_ops_bypass()
漏洞描述信息
In the Linux kernel, the following vulnerability has been resolved:
sched_ext: Replace rq_lock() to raw_spin_rq_lock() in scx_ops_bypass()
scx_ops_bypass() iterates all CPUs to re-enqueue all the scx tasks.
For each CPU, it acquires a lock using rq_lock() regardless of whether
a CPU is offline or the CPU is currently running a task in a higher
scheduler class (e.g., deadline). The rq_lock() is supposed to be used
for online CPUs, and the use of rq_lock() may trigger an unnecessary
warning in rq_pin_lock(). Therefore, replace rq_lock() to
raw_spin_rq_lock() in scx_ops_bypass().
Without this change, we observe the following warning:
===== START =====
[ 6.615205] rq->balance_callback && rq->balance_callback != &balance_push_callback
[ 6.615208] WARNING: CPU: 2 PID: 0 at kernel/sched/sched.h:1730 __schedule+0x1130/0x1c90
===== END =====
CVSS信息
N/A
漏洞类别
N/A
漏洞标题
Linux kernel 安全漏洞
漏洞描述信息
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于sched_ext模块中scx_ops_bypass函数使用了不合适的锁。这可能导致不必要的警告或调度问题。
CVSS信息
N/A
漏洞类别
其他