NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/55958: pciback.hide parsing error
The following reply was made to PR kern/55958; it has been noted by GNATS.
From: Aleksey Arens <aza.sea.agenda%gmail.com@localhost>
To: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost,
gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/55958: pciback.hide parsing error
Date: Tue, 26 Jan 2021 05:19:27 -0800
I tracked the problem to strncpy at
https://nxr.netbsd.org/xref/src/sys/arch/i386/stand/lib/exec.c#763
---8<---
bi = (struct bi_modulelist_entry *)(buf + off);
off += sizeof(struct bi_modulelist_entry);
strncpy(bi->path, bm->bm_path, sizeof(bi->path) - 1);
bi->base = image_end;
bi->len = len;
---8<---
The issue occurs because the static buffer size at
https://nxr.netbsd.org/xref/src/sys/arch/x86/include/bootinfo.h#180
---8<---
struct bi_modulelist_entry
{
char path[80];
int type;
int len;
uint32_t base;
};
---8<---
is too small to accommodate module arguments line longer than 80 characters.
Home |
Main Index |
Thread Index |
Old Index