Public bug reported:

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/rshim/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/rshim/misc with 
DISPLAY_LEVEL set to 2 in this file. The buffer shouldn't be overwritten or 
wrap-around.


[Regression Potential]
* Yes, it should be easy to add regression.

[Other]
* N/A

** Affects: linux-bluefield (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1919847

Title:
  rshim logging buffer could overflow and get lost

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-bluefield/+bug/1919847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to