Re: [PATCH v2 0/2] qnx4: Avoid confusing compiler about buffer lengths

2023-12-15 Thread Ronald Monthero
On Tue, Dec 5, 2023 at 8:10 AM Kees Cook wrote: > > On Tue, Dec 05, 2023 at 01:46:27AM +1000, Ronald Monthero wrote: > > Cheers Kees, > > BR, > > ronald > > Is this a "Tested-by"? :) Oh sorry Kees I have somehow missed this conversation. Yes ack the te

Re: [PATCH v2 0/2] qnx4: Avoid confusing compiler about buffer lengths

2023-12-04 Thread Ronald Monthero
Cheers Kees, BR, ronald On Fri, Dec 1, 2023 at 6:51 AM Kees Cook wrote: > > Hi, > > This attempts to fix the issue Ronald Monthero found[1]. Avoids using a > too-short struct buffer when reading the string, by using the existing > struct union. > > -Kees > > [1]

Re: [PATCH] qnx4: fix to avoid panic due to buffer overflow

2023-11-18 Thread Ronald Monthero
Thank you Kees and Anders, Cheers BR, Ronald On Fri, Nov 17, 2023 at 4:26 AM Kees Cook wrote: > > On Thu, Nov 16, 2023 at 05:48:20PM +0100, Anders Larsen wrote: > > On 2023-11-16 15:58 Kees Cook wrote: > > > if ((de->di_status & QNX4_FILE_LINK) == QNX4_FILE_LINK) { > > >

Re: [PATCH] qnx4: fix to avoid panic due to buffer overflow

2023-11-14 Thread Ronald Monthero
On Tue, Nov 14, 2023 at 1:40 AM Anders Larsen wrote: > < Snipped> > > sizeof(de->di_fname) is evaluated as QNX4_SHORT_NAME_MAX already at compile > time, see the definition of di_fname in uapi/linux/qnx4_fs.h > > I agree that the code is confusing, as 'de' is declared as a pointer to a > struct qn

Re: [PATCH] qnx4: fix to avoid panic due to buffer overflow

2023-11-13 Thread Ronald Monthero
On Mon, Nov 13, 2023 at 2:16 AM Anders Larsen wrote: > > On 2023-11-12 10:53 Ronald Monthero wrote: > > qnx4 dir name length can vary to be of maximum size > > QNX4_NAME_MAX or QNX4_SHORT_NAME_MAX depending on whether > > 'link info' entry is stored and the s

[PATCH] qnx4: fix to avoid panic due to buffer overflow

2023-11-12 Thread Ronald Monthero
ned-off-by: Ronald Monthero --- fs/qnx4/namei.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/fs/qnx4/namei.c b/fs/qnx4/namei.c index 8d72221735d7..825b891a52b3 100644 --- a/fs/qnx4/namei.c +++ b/fs/qnx4/namei.c @@ -40,6 +40,13 @@ static int qnx4_match(int len, const char *name,