Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146606884
D25600.id74236.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D25600.id74236.diff
View Options
Index: lib/libc/sys/msgctl.2
===================================================================
--- lib/libc/sys/msgctl.2
+++ lib/libc/sys/msgctl.2
@@ -31,7 +31,7 @@
.\"
.\" $FreeBSD$
.\"/
-.Dd July 9, 2009
+.Dd July 9, 2020
.Dt MSGCTL 2
.Os
.Sh NAME
@@ -63,8 +63,6 @@
.Bd -literal
struct msqid_ds {
struct ipc_perm msg_perm; /* msg queue permission bits */
- struct msg *__msg_first; /* kernel data, don't use */
- struct msg *__msg_last; /* kernel data, don't use */
msglen_t msg_cbytes; /* number of bytes in use on the queue */
msgqnum_t msg_qnum; /* number of msgs in the queue */
msglen_t msg_qbytes; /* max # of bytes on the queue */
Index: sys/kern/sysv_msg.c
===================================================================
--- sys/kern/sysv_msg.c
+++ sys/kern/sysv_msg.c
@@ -611,6 +611,7 @@
goto done2;
}
*msqbuf = msqkptr->u;
+ msqbuf->__msg_first = msqbuf->__msg_last = NULL;
if (td->td_ucred->cr_prison != msqkptr->cred->cr_prison)
msqbuf->msg_perm.key = IPC_PRIVATE;
break;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 5, 1:29 AM (13 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29264995
Default Alt Text
D25600.id74236.diff (1 KB)
Attached To
Mode
D25600: Avoid leaking kernel pointers from msgctl(IPC_STAT).
Attached
Detach File
Event Timeline
Log In to Comment