NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/61005: compat_linux fails to set si_pid when delivering SI_QUEUE signal to Linux process



>Number:         61005
>Category:       kern
>Synopsis:       compat_linux fails to set si_pid when delivering SI_QUEUE signal to Linux process
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 14 03:45:00 +0000 2026
>Originator:     Bobby Bingham
>Release:        NetBSD-current 20261111155711
>Organization:
>Environment:
NetBSD netbsdvm.local 11.99.11 NetBSD 11.99.11 (GENERIC) #0: Wed Nov 11 15:57:11 UTC 2026  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
When translating from NetBSD's siginfo to the Linux version of the struct, the si_pid member is not filled out when si_code is SI_QUEUE.  Instead, the line that fills out si_uid is duplicated.

Probably a copy/paste error.
>How-To-Repeat:
Apply the fix patches from PR61004, then follow the reproduction steps in that same PR, and the test will fail this time with the error "si_pid != getpid()"
>Fix:
diff --git a/sys/compat/linux/common/linux_signal.c b/sys/compat/linux/common/linux_signal.c
index 169e1032e08c..a6c885d6c6a1 100644
--- a/sys/compat/linux/common/linux_signal.c
+++ b/sys/compat/linux/common/linux_signal.c
@@ -213,7 +213,7 @@ native_to_linux_siginfo(linux_siginfo_t *lsi, const struct _ksiginfo *ksi)
 
 	case SI_TIMER:
 	case SI_QUEUE:
-		lsi->lsi_uid = ksi->_reason._rt._uid;
+		lsi->lsi_pid = ksi->_reason._rt._pid;
 		lsi->lsi_uid = ksi->_reason._rt._uid;
 		lsi->lsi_value.sival_ptr = ksi->_reason._rt._value.sival_ptr;
 		break;




Home | Main Index | Thread Index | Old Index