Commit 474aca6
kernel-stub: fix nullptr deref on error getting boot part UUID
The caller of disk_get_part_uuid is responsible for checking the return
value, as this function returns NULL in case of an error. This was not
done, leading to a nullptr dereference on error.
We fix this by checking the return code. Further, we now issue a error
message in case the UUID cannot be determined.
Fixes: 7c90e82 ("efi: implement systemd boot loader interface")
Reported-by: Jan Kiszka <[email protected]>
Signed-off-by: Felix Moessbauer <[email protected]>
Signed-off-by: Jan Kiszka <[email protected]>1 parent c9ac673 commit 474aca6
1 file changed
+11
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
211 | 217 | | |
212 | | - | |
213 | | - | |
214 | 218 | | |
215 | 219 | | |
216 | 220 | | |
| |||
0 commit comments