Re: [PATCH 0/4] fs/iso9660: Fix out-of-bounds read

2022-12-19 Thread Lidong Chen
> On Dec 14, 2022, at 1:42 PM, Thomas Schmitt wrote: > > Hi, > > i will review the patches hopefully tomorrow. > > But in [PATCH 2/4] and [4/4] i stumble over the statement that a SUSP > entry has 5 bytes of size. This is not true. The minimum size is 4. > In SUSP there are "Padding" PD (if

Re: [PATCH 1/4] fs/iso9660: Add check to prevent infinite loop

2022-12-19 Thread Lidong Chen
> On Dec 15, 2022, at 9:52 AM, Thomas Schmitt wrote: > > Hi, > > On Wed, 14 Dec 2022 18:55:02 + Lidong Chen wrote: >> There is no check for the end of block When reading > > s/When/when/ > >> directory extents. It resulted in read_node() always >> read from the same offset in the while

Re: [PATCH 2/4] fs/iso9660: Prevent read past the end of system use area

2022-12-19 Thread Lidong Chen
> On Dec 15, 2022, at 10:00 AM, Thomas Schmitt wrote: > > Hi, > > On Wed, 14 Dec 2022 18:55:03 + Lidong Chen wrote: >> In the code, the for loop advanced the entry pointer to the >> next entry before checking if the next entry is within the >> system use area boundary. Another issue in th

Re: [PATCH 3/4] fs/iso9660: Avoid reading past the entry boundary

2022-12-19 Thread Lidong Chen
> On Dec 15, 2022, at 10:08 AM, Thomas Schmitt wrote: > > Hi, > > On Wed, 14 Dec 2022 18:55:04 + Lidong Chen wrote: >> Added a check for the SP entry data boundary before reading it. >> >> Signed-off-by: Lidong Chen >> --- >> grub-core/fs/iso9660.c | 16 ++-- >> 1 file change

Re: [PATCH 1/4] fs/iso9660: Add check to prevent infinite loop

2022-12-19 Thread Thomas Schmitt
Hi, i wrote: > > (Are we aware of the file size limit of 32 GiB - 14 KiB - 1 imposed by > > struct grub_fshelp_node { ... struct grub_iso9660_dir dirents[8]; ... } > > ? ) Lidong Chen wrote: > I am not familiar with this file size limit. Do we need to add a check > somewhere? Good question. Th

[RFC PATCH] kern/dl: Add module version check

2022-12-19 Thread Zhang Boyang
This patch add version information to GRUB modules. Specifically, PACKAGE_VERSION is embedded as null-terminated string in .modver section. This string is checked at module loading time. That module will be rejected if mismatch is found. This will prevent loading modules from different versions of

Re: [PATCH 4/4] fs/iso9660: Incorrect check for entry boudary

2022-12-19 Thread Lidong Chen
> On Dec 15, 2022, at 10:20 AM, Thomas Schmitt wrote: > > Hi, > > On Wed, 14 Dec 2022 18:55:05 + Lidong Chen wrote: >> [PATCH 4/4] fs/iso9660: Incorrect check for entry boudary > > s/boudary/boundary/ > >> An entry consists of the entry info and the component area. > > Component area i