Follow-up Comment #2, bug #43601 (project grub): I believe I found the source of the issue. When the device is a net device, grub_pubkey_open in verify.c closes the net device at the end with the grub_file_close(io) call even though that is not the intent (io->device is nulled before the free call, but the call back into grub_net_fs_close closes the device anyway). When the function doing the original file operation (cat in my case) does it's close, the device is double freed and causes the memory corruption error. I've attached a patch that skips the grub_file_close(io) step in grub_pubkey_open if the device is a net device. This has fixed my issue without any adverse consequences.
(file #32459) _______________________________________________________ Additional Item Attachment: File name: verify.c.patch Size:0 KB _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?43601> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-grub mailing list Bug-grub@gnu.org https://lists.gnu.org/mailman/listinfo/bug-grub