* [PATCH 0/1] mcb patch for next round @ 2026-10-05 13:19 Johannes Thumshirn 2026-10-05 13:19 ` [PATCH 1/1] mcb: fix kasan read slab out of bounds Johannes Thumshirn 2026-10-26 7:59 ` [PATCH 0/1] mcb patch for next round Filip Jensen 0 siblings, 2 replies; 4+ messages in thread From: Johannes Thumshirn @ 2026-10-05 13:19 UTC (permalink / raw) To: Greg Kroah-Hartman; +Cc: linux-kernel, Filip Jensen, Johannes Thumshirn Hey Greg, here's a mcb patch I forgot to forward you. Thanks Filip for catching my mistake. Filip Jensen (1): mcb: fix kasan read slab out of bounds drivers/mcb/mcb-parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.51.0 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] mcb: fix kasan read slab out of bounds 2026-10-05 13:19 [PATCH 0/1] mcb patch for next round Johannes Thumshirn @ 2026-10-05 13:19 ` Johannes Thumshirn 2026-10-26 7:59 ` [PATCH 0/1] mcb patch for next round Filip Jensen 1 sibling, 0 replies; 4+ messages in thread From: Johannes Thumshirn @ 2026-10-05 13:19 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: linux-kernel, Filip Jensen, Jose Javier Rodriguez Barbarin, Johannes Thumshirn From: Filip Jensen <dev-Felipe.Jensen@duagon.com> Fixes the following kasan bug report reproducible when probing the driver: slab-out-of-bounds in string_nocheck lib/vsprintf.c:655 slab-out-of-bounds in string+0x396/0x440 lib/vsprintf.c:737 Read of size 1 at addr ffff88810dd32f94 by task modprobe/661 It is caused for passing snprintf a not null terminated string as a parameter but in the format string expecting one ("%s"), thus making it read pass the valid data. Another solution could be giving a length to the snprintf parameter: snprintf(bus->name,CHAMELEON_FILENAME_LEN + 1,"%.*s",CHAMELEON_FILENAME_LEN,header->filename); However, this solution seems less readable and since there is no need to format the input, apart from converting it into a right C string, a simple memcpy is here proposed. Reviewed-by: Jose Javier Rodriguez Barbarin <dev-josejavier.rodriguez@duagon.com> Signed-off-by: Filip Jensen <dev-Felipe.Jensen@duagon.com> Signed-off-by: Johannes Thumshirn <jth@kernel.org> --- drivers/mcb/mcb-parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mcb/mcb-parse.c b/drivers/mcb/mcb-parse.c index 7e09a0ea80f8..2b115cb0e5d9 100644 --- a/drivers/mcb/mcb-parse.c +++ b/drivers/mcb/mcb-parse.c @@ -200,8 +200,8 @@ int chameleon_parse_cells(struct mcb_bus *bus, phys_addr_t mapbase, bus->revision = header->revision; bus->model = header->model; bus->minor = header->minor; - snprintf(bus->name, CHAMELEON_FILENAME_LEN + 1, "%s", - header->filename); + memcpy(bus->name, header->filename, CHAMELEON_FILENAME_LEN); + bus->name[CHAMELEON_FILENAME_LEN] = '\0'; bar_count = chameleon_get_bar(&p, mapbase, &cb); if (bar_count < 0) { -- 2.51.0 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/1] mcb patch for next round 2026-10-05 13:19 [PATCH 0/1] mcb patch for next round Johannes Thumshirn 2026-10-05 13:19 ` [PATCH 1/1] mcb: fix kasan read slab out of bounds Johannes Thumshirn @ 2026-10-26 7:59 ` Filip Jensen 2026-10-26 12:09 ` Greg Kroah-Hartman 1 sibling, 1 reply; 4+ messages in thread From: Filip Jensen @ 2026-10-26 7:59 UTC (permalink / raw) To: Johannes Thumshirn; +Cc: Greg Kroah-Hartman, linux-kernel, Filip Jensen Mr. Kroah-Hartman: This is a friendly ping for this patch that was accepted some weeks ago. Thank you very much in advance. On Mon, 5 Oct 2026, Johannes Thumshirn wrote: > Hey Greg, > > here's a mcb patch I forgot to forward you. Thanks Filip for catching my > mistake. > > Filip Jensen (1): > mcb: fix kasan read slab out of bounds > > drivers/mcb/mcb-parse.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > -- > 2.51.0 > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/1] mcb patch for next round 2026-10-26 7:59 ` [PATCH 0/1] mcb patch for next round Filip Jensen @ 2026-10-26 12:09 ` Greg Kroah-Hartman 0 siblings, 0 replies; 4+ messages in thread From: Greg Kroah-Hartman @ 2026-10-26 12:09 UTC (permalink / raw) To: Filip Jensen; +Cc: Johannes Thumshirn, linux-kernel On Mon, Oct 26, 2026 at 08:59:19AM +0100, Filip Jensen wrote: > Mr. Kroah-Hartman: > > This is a friendly ping for this patch that was accepted some weeks ago. It's in my "to get to" queue, sorry for the delay. Given that this is a very low-priority issue, it will be handled after -rc1 is out, thanks. greg k-h ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-10-26 12:09 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2026-10-05 13:19 [PATCH 0/1] mcb patch for next round Johannes Thumshirn 2026-10-05 13:19 ` [PATCH 1/1] mcb: fix kasan read slab out of bounds Johannes Thumshirn 2026-10-26 7:59 ` [PATCH 0/1] mcb patch for next round Filip Jensen 2026-10-26 12:09 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®