NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/60403 CVS commit: [netbsd-11] src/sbin/efi



The following reply was made to PR bin/60403; it has been noted by GNATS.

From: "Martin Husemann" <martin%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/60403 CVS commit: [netbsd-11] src/sbin/efi
Date: Sun, 5 Jul 2026 07:34:58 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Jul  5 07:34:58 UTC 2026
 
 Modified Files:
 	src/sbin/efi [netbsd-11]: devpath.c
 
 Log Message:
 Pull up following revision(s) (requested by kre in ticket #366):
 
 	sbin/efi/devpath.c: revision 1.2
 
 PR bin/60403 : sbin/efi - fix core dump from assert in devpath
 
 assert(3) should never be used to validate data from external sources,
 only to validate assumptions about how the code itself works.
 Worse here, the assert() wasn't even validating that the externally sourced
 data was correctly formed, which it was; it was just in a format that wasn't
 common, and wasn't expected.
 
 What the output should be (the textual representation of the variable
 value) is unknown to me, I haven't been able to locate anything in the
 EFI standard which says (or even gives an example of the case in question).
 It might be there though somewhere I haven't found yet.
 
 The unusual case is when a variable which contains a path, like:
 Boot0000* NetBSD
     HD(3,GPT,d439564b-f7e4-4f92-b6ae-2fa0c33632f2,0x400,0x7f800)/
     File(\EFI\BOOT\BOOTX64.EFI)
 (divided into two lines here for the e-mail) contains other data as well,
 in a similar format to the HD() string.  Such things can be used to load
 filesystem code, drivers, and more, if needed.   They are uncommon for sure.
 What the format should be, I don't know - for this commit simply
 run the paths together, in an earlier version I used a ';' as a
 separator, but I can't find any justification, beyond personal whim
 for that one.   There could also be a space, or ...
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.1 -r1.1.2.1 src/sbin/efi/devpath.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 



Home | Main Index | Thread Index | Old Index