NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/61081: Double free of mbuf on bootparam RPC timeout during NFS mountroot
>Number: 61081
>Category: kern
>Synopsis: Double free of mbuf on bootparam RPC timeout during NFS mountroot
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 26 16:00:00 +0000 2026
>Originator: Izumi Tsutsui
>Release: NetBSD 11.99.11
>Organization:
>Environment:
System: NetBSD/news68k 11.99.11
Architecture: m68k (but maybe all)
Machine: news68k
>Description:
The following panic occurred during NFS mountroot after a network boot:
```
[ 82.4300040] nfs_boot: trying RARP (and RPC/bootparam)
[ 85.4400040] nfs_boot: client_addr=192.168.20.10 (RARP from 192.168.20.1)
[ 103.4700040] nfs_boot: timeout...
[ 108.4900040] nfs_boot: timeout...
[ 113.5100040] nfs_boot: timeout...
[ 118.5300040] panic: mbuf 0x5ea100 already freed
[ 118.5400040] cpu0: Begin traceback...
[ 118.5500040] ?(?)
[ 118.6300040] db_panic(5ea200,5ea100,347d30,1967e4,27e21f) at 0
[ 118.7600040] vpanic(27e21f,347d3c,347d48,1be818,27e21f) + 188
[ 118.9700040] panic(27e21f,5ea100,2acd00,1be7bc,347d58) + c
[ 119.1800040] m_free(5ea100) + 56
[ 119.2900040] m_freem(5ea100) + 16
[ 119.4700040] nfs_bootparam(5cd940,2acd00,347dfc,27360a) + 1f0
[ 119.6800040] nfs_boot_init(5cd940,2acd00,108,1) + be
[ 119.8700040] nfs_mountroot(2b58c0,1715c6,1965ec,347f98,1d92c4) + c6
[ 120.0000040] vfs_mountroot(5fe3c0) + 1c8
[ 120.1100040] main() + 588
[ 120.1300040] cpu0: End traceback...
```
It looks like bp_whoami() in sys/nfs/nfs_bootparam.c frees an mbuf
that has already been freed by krpc_call() in sys/nfs/krpc_subr.c.
>How-To-Repeat:
Try NFS mountroot using RARP with no response to the bootparam
WHOAMI RPC.
>Fix:
The ownership of the request mbuf in krpc_call() seems
inconsistent among its error paths. Some errors cause
the mbuf to be freed, while others do not.
This should be made consistent with its callers.
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index