Commit 080833e
authored
Fix hardware model and version on Lenovo (osquery#8534)
From Fleet: fleetdm/fleet#21648
This PR fixes an issue where Lenovo laptops report the hardware model and version incorrectly in the BIOS tables, resulting in incorrect values in the `hardware_model` and `hardware_version` columns of the `system_info` table. This issue affects both Windows and Linux. See fleetdm/fleet#21648 (comment) for examples of the undesirable output.
The fixes in this PR are:
* For Linux, swap the hardware_model and hardware_version values. The reported version is something like `ThinkPad L15 Gen 3` which is consistent with the kind of value typically reported as `hardware_model` from other vendors. The reported version is something like 21C8S3EA00 which appears to be a [product SKU](https://psref.lenovo.com/Detail/ThinkPad_L15_Gen_3_AMD?M=21C8S3EB00), which can serve as the "version" for this model.
* For Windows, retrieve the model name from the Win32_ComputerSystemProduct WMI class, and move the reported `hardware_model` into `hardware_version` as above.1 parent b875bf1 commit 080833e
File tree
2 files changed
+32
-0
lines changed- osquery/tables/system
- linux
- windows
2 files changed
+32
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
124 | 138 | | |
125 | 139 | | |
126 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
59 | 77 | | |
60 | 78 | | |
61 | 79 | | |
| |||
0 commit comments