GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix io_uring domain socket fd leak on multi-fd SCM_RIGHTS messages · netty/netty@e863e69

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • transport-classes-io_uring/src
    • main/java/io/netty/channel/uring
      • CmsgHdr.java
      • IoUringDomainSocketChannel.java
      • MsgHdr.java
      • MsgHdrMemory.java
      • Native.java
      • NativeStaticallyReferencedJniMethods.java
    • test/java/io/netty/channel/uring
      • CmsgHdrTest.java
  • transport-native-io_uring/src/main/c
    • netty_io_uring_native.c
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎transport-classes-io_uring/src/main/java/io/netty/channel/uring/CmsgHdr.java‎

Copy file name to clipboardExpand all lines: transport-classes-io_uring/src/main/java/io/netty/channel/uring/CmsgHdr.java
+85-2Lines changed: 85 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
*/
1616
package io.netty.channel.uring;
1717

18+
import io.netty.channel.unix.Errors;
19+
20+
import java.io.IOException;
1821
import java.nio.ByteBuffer;
1922

2023
/**
@@ -58,7 +61,87 @@ static void writeScmRights(ByteBuffer cmsghdr, int cmsgHdrDataOffset, int fd) {
5861
cmsghdr.putInt(cmsghdrPosition + cmsgHdrDataOffset, fd);
5962
}
6063

61-
static int readScmRights(ByteBuffer cmsghdr, int cmsgHdrDataOffset) {
62-
return cmsghdr.getInt(cmsghdr.position() + cmsgHdrDataOffset);
64+
/**
65+
* Reads the file descriptor delivered via a {@code SCM_RIGHTS} control message.
66+
* <p>
67+
* A malicious (or buggy) peer can pack more than one file descriptor into the single control message that
68+
* Netty only ever sizes for one fd. On 64-bit Linux {@code CMSG_SPACE(sizeof(int))} and
69+
* {@code CMSG_SPACE(2 * sizeof(int))} are both 24 bytes (due to 8 byte alignment), so the kernel does not
70+
* report {@code MSG_CTRUNC} even though two fds were delivered. If that is not detected the surplus fd is
71+
* never closed and leaks for the lifetime of the process (see CVE-2026-45536 for the equivalent issue that
72+
* was fixed for the epoll/kqueue transports in {@code netty_unix_socket_recvFd()}).
73+
* <p>
74+
* To guard against this we validate the cmsg level/type, compute the real number of fds from
75+
* {@code cmsg_len} and, if more than one fd (or a truncated message) was received, close every fd we got
76+
* and fail instead of silently returning a partial (and leaking) result.
77+
*
78+
* @throws IOException if the control message did not carry exactly one well-formed {@code SCM_RIGHTS} fd.
79+
*/
80+
static int readScmRights(ByteBuffer cmsghdr, int cmsgHdrDataOffset, boolean truncated) throws IOException {
81+
int cmsghdrPosition = cmsghdr.position();
82+
long cmsgLen = Native.SIZEOF_SIZE_T == 4
83+
? cmsghdr.getInt(cmsghdrPosition + Native.CMSG_OFFSETOF_CMSG_LEN) & 0xFFFFFFFFL
84+
: cmsghdr.getLong(cmsghdrPosition + Native.CMSG_OFFSETOF_CMSG_LEN);
85+
int cmsgLevel = cmsghdr.getInt(cmsghdrPosition + Native.CMSG_OFFSETOF_CMSG_LEVEL);
86+
int cmsgType = cmsghdr.getInt(cmsghdrPosition + Native.CMSG_OFFSETOF_CMSG_TYPE);
87+
88+
if (cmsgLevel != Native.SOL_SOCKET || cmsgType != Native.SCM_RIGHTS) {
89+
throw new IOException(
90+
"Received unexpected cmsg (level: " + cmsgLevel + ", type: " + cmsgType + ')');
91+
}
92+
93+
// MSG_CTRUNC only means that some of the control data was discarded, the kernel still reports the fds it did
94+
// deliver via cmsg_len. So always compute nfds from cmsg_len to be able to close whatever was delivered.
95+
int nfds = numFds(cmsgLen, Native.CMSG_LEN_FOR_FD, Native.SIZEOF_INT);
96+
if (truncated || nfds != 1) {
97+
IOException error = new IOException(truncated
98+
? "Received a truncated SCM_RIGHTS cmsg (cmsg_len: " + cmsgLen + ')'
99+
: nfds < 0
100+
? "Received a malformed SCM_RIGHTS cmsg (cmsg_len: " + cmsgLen + ')'
101+
: "Received " + nfds + " file descriptors in a single SCM_RIGHTS cmsg, expected 1");
102+
// Close every fd that was actually delivered so nothing leaks, even though we reject the message.
103+
int toClose = numFdsToClose(nfds, truncated);
104+
for (int i = 0; i < toClose; i++) {
105+
closeQuietly(cmsghdr.getInt(cmsghdrPosition + cmsgHdrDataOffset + i * Native.SIZEOF_INT), error);
106+
}
107+
throw error;
108+
}
109+
return cmsghdr.getInt(cmsghdrPosition + cmsgHdrDataOffset);
110+
}
111+
112+
/**
113+
* Computes how many file descriptors a {@code SCM_RIGHTS} cmsg of the given {@code cmsgLen} carries, given
114+
* {@code cmsgLenForFd}, the platform's {@code CMSG_LEN(sizeof(int))} (the length of a cmsg holding exactly
115+
* one fd), and {@code sizeofInt}, the platform's {@code sizeof(int)}. Returns {@code -1} if {@code cmsgLen}
116+
* is smaller than one fd or not a whole number of fds (i.e. truncated or malformed).
117+
* <p>
118+
* Pure function of primitives (no native/JNI dependency) so it can be unit tested in isolation.
119+
*/
120+
static int numFds(long cmsgLen, int cmsgLenForFd, int sizeofInt) {
121+
long dataLen = cmsgLen - (cmsgLenForFd - sizeofInt);
122+
if (dataLen < sizeofInt || dataLen % sizeofInt != 0) {
123+
return -1;
124+
}
125+
return (int) (dataLen / sizeofInt);
126+
}
127+
128+
/**
129+
* Returns the number of delivered fds that must be closed because the message is rejected: all of them if the
130+
* message was truncated (and at least one fd was delivered) or if more than one fd was delivered.
131+
* <p>
132+
* Pure function of primitives so it can be unit tested in isolation.
133+
*/
134+
static int numFdsToClose(int nfds, boolean truncated) {
135+
return nfds > 0 && (truncated || nfds > 1) ? nfds : 0;
136+
}
137+
138+
private static void closeQuietly(int fd, Throwable error) {
139+
if (fd < 0) {
140+
return;
141+
}
142+
int res = Native.close(fd);
143+
if (res < 0) {
144+
error.addSuppressed(Errors.newIOException("close", res));
145+
}
63146
}
64147
}
Collapse file

‎transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringDomainSocketChannel.java‎

Copy file name to clipboardExpand all lines: transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringDomainSocketChannel.java
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,11 @@ protected void readComplete0(byte op, int res, int flags, short data, int outsta
223223
final ChannelPipeline pipeline = pipeline();
224224
try {
225225
int nativeCallResult = res >= 0 ? res : Errors.ioResult("io_uring recvmsg", res);
226+
if (nativeCallResult == 0) {
227+
// EOF: the peer closed the connection, so there is no control message to inspect.
228+
shutdownInput(true);
229+
return;
230+
}
226231
int nativeFd = readMsgHdrMemory.getScmRightsFd();
227232
allocHandle.lastBytesRead(nativeFd);
228233
allocHandle.incMessagesRead(1);
Collapse file

‎transport-classes-io_uring/src/main/java/io/netty/channel/uring/MsgHdr.java‎

Copy file name to clipboardExpand all lines: transport-classes-io_uring/src/main/java/io/netty/channel/uring/MsgHdr.java
+12-2Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import io.netty.channel.unix.Buffer;
1919

20+
import java.io.IOException;
2021
import java.nio.ByteBuffer;
2122

2223
/**
@@ -132,7 +133,16 @@ static void prepReadFd(ByteBuffer memory, ByteBuffer msgControl, int cmsgHdrData
132133
}
133134
}
134135

135-
static int getCmsgData(ByteBuffer memory, ByteBuffer msgControl, int cmsgHdrDataOffset) {
136-
return CmsgHdr.readScmRights(msgControl, cmsgHdrDataOffset);
136+
static int getCmsgData(ByteBuffer memory, ByteBuffer msgControl, int cmsgHdrDataOffset) throws IOException {
137+
int memoryPosition = memory.position();
138+
long msgControlLen = Native.SIZEOF_SIZE_T == 4
139+
? memory.getInt(memoryPosition + Native.MSGHDR_OFFSETOF_MSG_CONTROLLEN) & 0xFFFFFFFFL
140+
: memory.getLong(memoryPosition + Native.MSGHDR_OFFSETOF_MSG_CONTROLLEN);
141+
if (msgControlLen <= 0) {
142+
throw new IOException("Received no ancillary data while expecting a SCM_RIGHTS file descriptor");
143+
}
144+
int msgFlags = memory.getInt(memoryPosition + Native.MSGHDR_OFFSETOF_MSG_FLAGS);
145+
boolean truncated = (msgFlags & Native.MSG_CTRUNC) != 0;
146+
return CmsgHdr.readScmRights(msgControl, cmsgHdrDataOffset, truncated);
137147
}
138148
}
Collapse file

‎transport-classes-io_uring/src/main/java/io/netty/channel/uring/MsgHdrMemory.java‎

Copy file name to clipboardExpand all lines: transport-classes-io_uring/src/main/java/io/netty/channel/uring/MsgHdrMemory.java
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import io.netty.util.internal.CleanableDirectBuffer;
2222
import io.netty.util.internal.PlatformDependent;
2323

24+
import java.io.IOException;
2425
import java.net.InetSocketAddress;
2526
import java.nio.ByteBuffer;
2627
import java.nio.ByteOrder;
@@ -140,7 +141,7 @@ void setScmRightsFd(int fd) {
140141
MsgHdr.prepSendFd(msgHdrMemory, fd, cmsgDataMemory, cmsgDataOffset, iovMemory, 1);
141142
}
142143

143-
int getScmRightsFd() {
144+
int getScmRightsFd() throws IOException {
144145
return MsgHdr.getCmsgData(msgHdrMemory, cmsgDataMemory, cmsgDataOffset);
145146
}
146147

Collapse file

‎transport-classes-io_uring/src/main/java/io/netty/channel/uring/Native.java‎

Copy file name to clipboardExpand all lines: transport-classes-io_uring/src/main/java/io/netty/channel/uring/Native.java
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ final class Native {
116116
NativeStaticallyReferencedJniMethods.sockaddrIn6OffsetofSin6ScopeId();
117117
static final int IN6_ADDRESS_OFFSETOF_S6_ADDR = NativeStaticallyReferencedJniMethods.in6AddressOffsetofS6Addr();
118118
static final int SIZEOF_SIZE_T = NativeStaticallyReferencedJniMethods.sizeofSizeT();
119+
static final int SIZEOF_INT = NativeStaticallyReferencedJniMethods.sizeofInt();
119120
static final int SIZEOF_IOVEC = NativeStaticallyReferencedJniMethods.sizeofIovec();
120121
static final int CMSG_SPACE = NativeStaticallyReferencedJniMethods.cmsgSpace();
121122
static final int CMSG_SPACE_FOR_FD = NativeStaticallyReferencedJniMethods.cmsgSpaceForFd();
@@ -326,6 +327,7 @@ static String opToStr(byte op) {
326327
static final int IOSQE_CQE_SKIP_SUCCESS = 1 << 6;
327328
static final int MSG_DONTWAIT = NativeStaticallyReferencedJniMethods.msgDontwait();
328329
static final int MSG_FASTOPEN = NativeStaticallyReferencedJniMethods.msgFastopen();
330+
static final int MSG_CTRUNC = NativeStaticallyReferencedJniMethods.msgCtrunc();
329331
static final int SOL_UDP = NativeStaticallyReferencedJniMethods.solUdp();
330332
static final int SOL_SOCKET = NativeStaticallyReferencedJniMethods.solSocket();
331333
static final int UDP_SEGMENT = NativeStaticallyReferencedJniMethods.udpSegment();
@@ -627,6 +629,12 @@ static IoUringProbe ioUringProbe(int ringfd) {
627629

628630
static native void eventFdWrite(int fd, long value);
629631

632+
/**
633+
* Close the given fd, returning {@code 0} on success or the negated {@code errno} on failure. {@code EINTR}
634+
* is treated as success, matching {@code FileDescriptor.close()} semantics.
635+
*/
636+
static native int close(int fd);
637+
630638
static int getFd(DefaultFileRegion fileChannel) {
631639
return getFd0(fileChannel);
632640
}
Collapse file

‎transport-classes-io_uring/src/main/java/io/netty/channel/uring/NativeStaticallyReferencedJniMethods.java‎

Copy file name to clipboardExpand all lines: transport-classes-io_uring/src/main/java/io/netty/channel/uring/NativeStaticallyReferencedJniMethods.java
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ private NativeStaticallyReferencedJniMethods() { }
5454
static native int sockaddrUnOffsetofSunPath();
5555
static native int maxSunPathLen();
5656
static native int sizeofSizeT();
57+
static native int sizeofInt();
5758
static native int sizeofIovec();
5859
static native int iovecOffsetofIovBase();
5960
static native int iovecOffsetofIovLen();
@@ -79,6 +80,7 @@ private NativeStaticallyReferencedJniMethods() { }
7980
static native int msgDontwait();
8081
static native int iosqeBufferSelect();
8182
static native int msgFastopen();
83+
static native int msgCtrunc();
8284
static native int cmsgSpace();
8385
static native int cmsgSpaceForFd();
8486
static native int cmsgLen();
Collapse file

‎transport-classes-io_uring/src/test/java/io/netty/channel/uring/CmsgHdrTest.java‎

Copy file name to clipboard
+101Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
/*
2+
* Copyright 2026 The Netty Project
3+
*
4+
* The Netty Project licenses this file to you under the Apache License,
5+
* version 2.0 (the "License"); you may not use this file except in compliance
6+
* with the License. You may obtain a copy of the License at:
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
package io.netty.channel.uring;
17+
18+
import org.junit.jupiter.api.Test;
19+
import org.junit.jupiter.api.condition.EnabledForJreRange;
20+
import org.junit.jupiter.api.condition.JRE;
21+
22+
import static org.junit.jupiter.api.Assertions.assertEquals;
23+
24+
/**
25+
* Tests for {@link CmsgHdr#numFds(long, int, int)}, the pure fd-count computation used to detect a peer packing
26+
* more than one file descriptor into the single {@code SCM_RIGHTS} control message that Netty's io_uring
27+
* transport sizes for exactly one fd (CVE-2026-45536 equivalent for io_uring; the epoll/kqueue transports
28+
* already guard against this in {@code netty_unix_socket_recvFd()}).
29+
* <p>
30+
* This test intentionally never touches the {@link Native} class (which loads the native library) so it can run
31+
* without the io_uring native library being available, exactly like {@link LoadClassTest}.
32+
*/
33+
// CmsgHdr is compiled with release 9 (see the module's pom.xml), so it cannot be loaded on a Java 8
34+
// runtime; gate the whole class since every test here touches CmsgHdr.
35+
@EnabledForJreRange(min = JRE.JAVA_9)
36+
public class CmsgHdrTest {
37+
38+
// sizeof(int) is 4 on every Linux architecture io_uring supports.
39+
private static final int SIZEOF_INT = 4;
40+
// CMSG_LEN(sizeof(int)) on 64-bit Linux: CMSG_ALIGN(sizeof(struct cmsghdr)) [16] + sizeof(int) [4].
41+
private static final int CMSG_LEN_FOR_FD_64BIT = 20;
42+
// CMSG_LEN(sizeof(int)) on 32-bit Linux: CMSG_ALIGN(sizeof(struct cmsghdr)) [12] + sizeof(int) [4].
43+
private static final int CMSG_LEN_FOR_FD_32BIT = 16;
44+
45+
@Test
46+
public void singleFdIsAccepted() {
47+
assertEquals(1, CmsgHdr.numFds(CMSG_LEN_FOR_FD_64BIT, CMSG_LEN_FOR_FD_64BIT, SIZEOF_INT));
48+
assertEquals(1, CmsgHdr.numFds(CMSG_LEN_FOR_FD_32BIT, CMSG_LEN_FOR_FD_32BIT, SIZEOF_INT));
49+
}
50+
51+
@Test
52+
public void twoFdsPackedIntoBufferSizedForOneAreDetected() {
53+
// This is the crux of the vulnerability: on 64-bit Linux CMSG_SPACE(sizeof(int)) (the buffer Netty
54+
// allocates) and CMSG_SPACE(2 * sizeof(int)) are both 24 bytes because of 8-byte alignment, so a peer
55+
// can pack 2 fds into the same space without the kernel ever setting MSG_CTRUNC. cmsg_len for that
56+
// 2-fd message is CMSG_LEN_FOR_FD + sizeof(int) == 24.
57+
assertEquals(2, CmsgHdr.numFds(CMSG_LEN_FOR_FD_64BIT + 4, CMSG_LEN_FOR_FD_64BIT, SIZEOF_INT));
58+
}
59+
60+
@Test
61+
public void manyFdsPackedIntoOneCmsgAreDetected() {
62+
assertEquals(5, CmsgHdr.numFds(CMSG_LEN_FOR_FD_64BIT + 4 * 4, CMSG_LEN_FOR_FD_64BIT, SIZEOF_INT));
63+
}
64+
65+
@Test
66+
public void cmsgLenSmallerThanOneFdIsTruncated() {
67+
assertEquals(-1, CmsgHdr.numFds(CMSG_LEN_FOR_FD_64BIT - 1, CMSG_LEN_FOR_FD_64BIT, SIZEOF_INT));
68+
assertEquals(-1, CmsgHdr.numFds(0, CMSG_LEN_FOR_FD_64BIT, SIZEOF_INT));
69+
}
70+
71+
@Test
72+
public void cmsgLenNotAWholeNumberOfFdsIsMalformed() {
73+
assertEquals(-1, CmsgHdr.numFds(CMSG_LEN_FOR_FD_64BIT + 1, CMSG_LEN_FOR_FD_64BIT, SIZEOF_INT));
74+
assertEquals(-1, CmsgHdr.numFds(CMSG_LEN_FOR_FD_64BIT + 3, CMSG_LEN_FOR_FD_64BIT, SIZEOF_INT));
75+
}
76+
77+
@Test
78+
public void truncatedMessageWithDeliveredFdsClosesThem() {
79+
// MSG_CTRUNC does not mean no fd was delivered, so the delivered one needs to be closed.
80+
assertEquals(1, CmsgHdr.numFdsToClose(1, true));
81+
assertEquals(2, CmsgHdr.numFdsToClose(2, true));
82+
}
83+
84+
@Test
85+
public void truncatedMessageWithoutDeliveredFdsClosesNothing() {
86+
assertEquals(0, CmsgHdr.numFdsToClose(-1, true));
87+
assertEquals(0, CmsgHdr.numFdsToClose(0, true));
88+
}
89+
90+
@Test
91+
public void multipleFdsAreAllClosedEvenIfNotTruncated() {
92+
assertEquals(2, CmsgHdr.numFdsToClose(2, false));
93+
assertEquals(5, CmsgHdr.numFdsToClose(5, false));
94+
}
95+
96+
@Test
97+
public void singleFdInNonTruncatedMessageIsNotClosed() {
98+
assertEquals(0, CmsgHdr.numFdsToClose(1, false));
99+
assertEquals(0, CmsgHdr.numFdsToClose(-1, false));
100+
}
101+
}
Collapse file

‎transport-native-io_uring/src/main/c/netty_io_uring_native.c‎

Copy file name to clipboardExpand all lines: transport-native-io_uring/src/main/c/netty_io_uring_native.c
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,21 @@ static void netty_io_uring_eventFdWrite(JNIEnv* env, jclass clazz, jint fd, jlon
222222
netty_unix_errors_throwChannelExceptionErrorNo(env, "eventfd_write(...) failed: ", err);
223223
}
224224

225+
static jint netty_io_uring_close(JNIEnv* env, jclass clazz, jint fd) {
226+
if (close(fd) < 0) {
227+
// There is really nothing "sane" we can do when EINTR was reported on close. So just ignore it and
228+
// "assume" everything is fine == we closed the file descriptor.
229+
//
230+
// For more details see:
231+
// - https://bugs.chromium.org/p/chromium/issues/detail?id=269623
232+
// - https://lwn.net/Articles/576478/
233+
if (errno != EINTR) {
234+
return -errno;
235+
}
236+
}
237+
return 0;
238+
}
239+
225240
static jint netty_io_uring_getFd0(JNIEnv* env, jclass clazz, jobject fileRegion) {
226241
jobject fileChannel = (*env)->GetObjectField(env, fileRegion, fileChannelFieldId);
227242
if (fileChannel == NULL) {
@@ -600,6 +615,10 @@ static jint netty_io_uring_sizeofSizeT(JNIEnv* env, jclass clazz) {
600615
return sizeof(size_t);
601616
}
602617

618+
static jint netty_io_uring_sizeofInt(JNIEnv* env, jclass clazz) {
619+
return sizeof(int);
620+
}
621+
603622
static jint netty_io_uring_sizeofIovec(JNIEnv* env, jclass clazz) {
604623
return sizeof(struct iovec);
605624
}
@@ -758,6 +777,10 @@ static jint netty_io_uring_msgFastopen(JNIEnv* env, jclass clazz) {
758777
return MSG_FASTOPEN;
759778
}
760779

780+
static jint netty_io_uring_msgCtrunc(JNIEnv* env, jclass clazz) {
781+
return MSG_CTRUNC;
782+
}
783+
761784
static jint netty_io_uring_cmsgSpace(JNIEnv* env, jclass clazz) {
762785
return CMSG_SPACE(sizeof(uint16_t));
763786
}
@@ -821,6 +844,7 @@ static const JNINativeMethod statically_referenced_fixed_method_table[] = {
821844
{ "sockaddrUnOffsetofSunPath", "()I", (void *) netty_io_uring_sockaddrUnOffsetofSunPath },
822845
{ "maxSunPathLen", "()I", (void *) netty_io_uring_max_sun_path_len },
823846
{ "sizeofSizeT", "()I", (void *) netty_io_uring_sizeofSizeT },
847+
{ "sizeofInt", "()I", (void *) netty_io_uring_sizeofInt },
824848
{ "sizeofIovec", "()I", (void *) netty_io_uring_sizeofIovec },
825849
{ "cmsgSpace", "()I", (void *) netty_io_uring_cmsgSpace},
826850
{ "cmsgSpaceForFd", "()I", (void *) netty_io_uring_cmsgSpace_for_fd},
@@ -851,6 +875,7 @@ static const JNINativeMethod statically_referenced_fixed_method_table[] = {
851875
{ "iosqeBufferSelect", "()I", (void *) netty_io_uring_BufferSelect },
852876
{ "msgDontwait", "()I", (void *) netty_io_uring_msgDontwait },
853877
{ "msgFastopen", "()I", (void *) netty_io_uring_msgFastopen },
878+
{ "msgCtrunc", "()I", (void *) netty_io_uring_msgCtrunc },
854879
{ "solUdp", "()I", (void *) netty_io_uring_solUdp },
855880
{ "solSocket", "()I", (void *) netty_io_uring_solSocket },
856881
{ "udpSegment", "()I", (void *) netty_io_uring_udpSegment },
@@ -882,6 +907,7 @@ static const JNINativeMethod method_table[] = {
882907
{"ioUringEnter", "(IIII)I", (void *) netty_io_uring_enter},
883908
{"blockingEventFd", "()I", (void *) netty_epoll_native_blocking_event_fd},
884909
{"eventFdWrite", "(IJ)V", (void *) netty_io_uring_eventFdWrite },
910+
{"close", "(I)I", (void *) netty_io_uring_close },
885911
{"registerUnix", "()I", (void *) netty_io_uring_registerUnix },
886912
{"cmsghdrData", "(J)J", (void *) netty_io_uring_cmsghdrData},
887913
{"kernelVersion", "()Ljava/lang/String;", (void *) netty_io_uring_kernel_version },

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.