rshim logging buffer could overflow and get lost
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-bluefield (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Medium
|
Unassigned |
Bug Description
On Bluefield platforms, the 'bfrshlog' script can be used to write a string into the internal rshim logging buffer which has size 1KB. When the buffer is full, the intention is to drop the new data. However, due to a bug, the buffer could be overwritten and wrap-around when full.
SRU Justification:
[Impact]
* When 'cat /dev/rshim0/misc' with DISPLAY_LEVEL set to 2, the logging buffer could be potentially displayed as empty when it's full.
[Fix]
* Add the check properly to make sure the buffer won't wrap-around.
[Test Case]
* Run "bfrshlog <some-message>" repeatedly and check the /dev/rshim0/misc with DISPLAY_LEVEL set to 2 in this file. The buffer shouldn't be overwritten or wrap-around.
[Regression Potential]
* The rshim log can be displayed by setting "DISPLAY_LEVEL 2" in /dev/rshim0/misc, then "cat /dev/rshim0/misc" to see the log messages. The log should contains ATF/UEFI booting progress and user logs from Linux applications by using the bfrshlog script. In any case, the log should always start from ATF logging, not overwritten or wrap-around. When the buffer is full, new data will be dropped.
[Other]
* N/A
CVE References
Changed in linux-bluefield (Ubuntu Focal): | |
importance: | Undecided → Medium |
status: | New → In Progress |
Changed in linux-bluefield (Ubuntu): | |
status: | New → Invalid |
description: | updated |
Changed in linux-bluefield (Ubuntu Focal): | |
status: | In Progress → Fix Committed |
This bug is awaiting verification that the 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- focal' to 'verification- done-focal' . If the problem still exists, change the tag 'verification- needed- focal' to 'verification- failed- focal'.
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!