fwts uefirtvariable test identifies variables with same name but different GUIDs as identical
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Firmware Test Suite |
Fix Released
|
High
|
Ivan Hu |
Bug Description
Here's another one:
1) Type "sudo su" to get root shell.
2) Run "fwts uefirtvariable". Get passing results.
2) Type "printf "\x07\x00\
3) Type "printf "\x07\x00\
4) run "fwts uefirtvariable" again.
The result is a spurious failure on test 2:
Test GetNextVariableName interface returns unique variables.
FAILED [HIGH] UEFIRuntimeGetN
found.
I'm attaching a results.log file that shows two runs, just as in the preceding procedure. Deleting either of the "myvar-*" variable files results in a pass result again. It looks to me like an off-by-one error in bucket_insert(), resulting in a hit on the original variable when looking for a duplicate. Judging by comments in the source code, it looks like a failure in this situation is unintended and is a bug.
FWIW, I first encountered this bug on a Lenovo E530 laptop that had several variables named "AdvancedPage" but different GUIDs, so this bug may crop up in real-world tests.
Related branches
Changed in fwts: | |
assignee: | nobody → Ivan Hu (ivan.hu) |
status: | New → In Progress |
importance: | Undecided → High |
Changed in fwts: | |
status: | In Progress → Fix Committed |
milestone: | none → 14.05.00 |
Changed in fwts: | |
status: | Fix Committed → Fix Released |
Fix sent to fwts-devel for review: https:/ /lists. ubuntu. com/archives/ fwts-devel/ 2014-April/ 004711. html