memory leaks when configuring a small rate limit in audit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
High
|
gerald.yang | ||
Noble |
Fix Committed
|
High
|
gerald.yang | ||
Plucky |
Fix Committed
|
High
|
gerald.yang | ||
Questing |
Fix Released
|
High
|
gerald.yang |
Bug Description
[Impact]
When the audit rate limit is exceeded, memory starts leaking, this can be observed by:
watch -d -n 1 grep -i SUnreclaim' /proc/meminfo
Unreclaimable slab grows rapidly and lead to run out of all available memory
Only reboot can recover it.
5.15 kernel doesn't have this issue, it's introduced later than 5.19 kernel,
and caused by LSM stacking code.
[Fix]
This upstream patch fixes the issue:
https://<email address hidden>/T/#t
and merged into maintainer's tree:
https:/
[Test Plan]
Add the following line to set a small rate limit in /etc/audit/
-a always,exit -F arch=b64 -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access -r 100
Trigger permission denied by running the following command as a normal user:
while :; do cat /proc/1/environ; done
Make sure we see the warning message in kernel log:
[ 2531.862184] audit: rate limit exceeded
[Where problems could occur]
Originally the skb is leak and no one is able to process or free it anymore.
The above patch just frees the leaking skb when rate limit is exceeded,
there won't be any additional impact.
[ Other Info ]
https:/
Changed in linux (Ubuntu): | |
importance: | Undecided → High |
status: | New → In Progress |
assignee: | nobody → gerald.yang (gerald-yang-tw) |
Changed in linux (Ubuntu Noble): | |
status: | New → In Progress |
Changed in linux (Ubuntu Plucky): | |
status: | New → In Progress |
Changed in linux (Ubuntu Noble): | |
importance: | Undecided → High |
Changed in linux (Ubuntu Plucky): | |
importance: | Undecided → High |
Changed in linux (Ubuntu Noble): | |
assignee: | nobody → gerald.yang (gerald-yang-tw) |
Changed in linux (Ubuntu Plucky): | |
assignee: | nobody → gerald.yang (gerald-yang-tw) |
description: | updated |
description: | updated |
Changed in linux (Ubuntu Noble): | |
importance: | High → Critical |
Changed in linux (Ubuntu Plucky): | |
importance: | High → Critical |
Changed in linux (Ubuntu Questing): | |
importance: | High → Critical |
tags: | added: kernel-daily-bug |
Changed in linux (Ubuntu Noble): | |
importance: | Critical → High |
Changed in linux (Ubuntu Plucky): | |
importance: | Critical → High |
Changed in linux (Ubuntu Questing): | |
importance: | Critical → High |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Noble): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Plucky): | |
status: | In Progress → Fix Committed |
This bug is awaiting verification that the linux/6.14.0-34.34 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification- needed- plucky- linux' to 'verification- done-plucky- linux'. If the problem still exists, change the tag 'verification- needed- plucky- linux' to 'verification- failed- plucky- linux'.
If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.
See https:/ /wiki.ubuntu. com/Testing/ EnableProposed for documentation how to enable and use -proposed. Thank you!