| 0/0 |
2026/09/04 00:47 |
flow |
assessment-security |
14m
Results: map[DenialOfService:true Explanation:Based on the analysis of the bug report and the source code, here is the
assessment of the security impact:
**Bug Mechanism:**
The bug is a NULL pointer dereference in the `trace_rtrs_rdma_error_recovery`
tracepoint.
When an RDMA connection attempt fails (e.g., the remote server rejects the
connection or is unreachable), the RDMA CM event handler
`rtrs_clt_rdma_cm_handler` is invoked asynchronously. This handler calls
`rtrs_rdma_error_recovery`, which in turn triggers the
`trace_rtrs_rdma_error_recovery` tracepoint.
The tracepoint attempts to copy the session name using
`memcpy(__entry->sessname, kobject_name(&clt_path->kobj), NAME_MAX)`. However,
`clt_path->kobj` is only initialized in `rtrs_clt_create_path_files()`, which is
called *after* the connection is successfully established (i.e., after
`init_path()` returns successfully).
Because the connection failed, `clt_path->kobj` remains uninitialized (zeroed
out during allocation), meaning `kobj->name` is `NULL`. The tracepoint then
passes this `NULL` pointer to `memcpy`, resulting in a kernel oops when it tries
to read from address 0.
**Exploitability:**
This is strictly a read from a `NULL` pointer (`memcpy` reading from `NULL`). On
modern Linux systems, address 0 is unmapped (protected by `mmap_min_addr`), so
the read will reliably cause a page fault and a kernel oops. It does not lead to
memory corruption, information leaks, or privilege escalation. Therefore, it is
**not exploitable**.
**Denial of Service:**
The kernel oops will kill the RDMA CM thread or the workqueue worker thread
handling the event. This can leave locks held, leak resources, and hang the
RNBD/RTRS subsystem, resulting in a **Denial of Service**.
**Privilege Requirements:**
To trigger this bug, a user must initiate an RNBD (RDMA Network Block Device)
connection. This is done by writing to the
`/sys/class/rnbd-client/ctl/map_device` sysfs file (or similar sysfs
interfaces). These sysfs files are owned by root and have `0644` permissions,
meaning only the global root user can write to them. Therefore, the bug **cannot
be triggered by unprivileged users** or from within **user namespaces** (as
sysfs is not writable in this context).
**Network Trigger:**
If a root user attempts to connect to a remote server, that server can
intentionally trigger the bug by rejecting the RDMA connection (sending an RDMA
CM reject or error packet over RoCE/Ethernet). Because the crash is ultimately
triggered by processing this ingress network packet during the connection
handshake, it qualifies as an **Ethernet Network Trigger**. Exploitable:false FilesystemTrigger:false NetworkTrigger:true PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:false VMGuestTrigger:false VMHostTrigger:false]
|
| 1/1 |
2026/09/04 00:47 |
action |
syz-repro-to-c-repro |
0m
Results:
|
| 2/1 |
2026/09/04 00:47 |
action |
kernel-checkouter |
0m
Results: map[KernelSrc:/app/workdir/cache/src/2be1aeb1f5ee0ceace15b0e71b019d9d3c2b9a13]
|
| 3/1 |
2026/09/04 00:47 |
action |
kernel-builder |
5m
Results: map[KernelObj:/app/workdir/cache/build/299bfa966caf8fd5149fd16429dbaea1fdefc0d2]
|
| 4/1 |
2026/09/04 00:53 |
action |
codesearch-prepare |
4m
Results: map[Index:codesearch-index]
|
| 5/1 |
2026/09/04 00:57 |
agent |
expert |
4m
Model:
Results: map[DenialOfService:true Exploitable:false FilesystemTrigger:false NetworkTrigger:true PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:false VMGuestTrigger:false VMHostTrigger:false]
Instruction: You are an experienced Linux kernel security engineer. Your task is to analyze given kernel bug report
and determine its security impact based on the following dimensions.
Use the provided tools to examine the source code, check for capability checks (e.g., capable(), ns_capable()),
and understand the nature of the bug. Analyze the given kernel build and configuration.
You can check the kernel config by grepping ".config" file; you can check kernel cmdline by grepping
".config" file for "CONFIG_CMDLINE=". Assume sysctl parameters have default values.
But analyze for the corresponding production build w/o debugging tools enabled (like KASAN, KMSAN, UBSAN).
Try different strategies when analyzing the bug:
- think of ways in which the vulnerable code is unreachable
- or the other way around: try to come up with different ideas of how an unprivileged user can reach the bug
If still unsure err on the side of the bug being non-exploitable/not-accessible.
In the final reply, provide a reasoning for your assessment.
Analysis dimensions:
* Exploitable:
Determine if the bug can result in memory corruption, elevated privileges, or an information leak.
Memory safety issues are almost always exploitable (KASAN or UBSAN reports for use-after-free, out-of-bounds;
refcounting issues, corrupted lists, etc). When kernel is crashing on a completely wild pointer access
(e.g. user-space address, or non-canonical address, but not on NULL or address corresponding to KASAN shadow
for NULL address), including both data accesses and control transfers, that also usually implies possibility
of exploitation. Such reports usually say "unable to handle kernel paging request".
Uses of uninitialized values detected by KMSAN may be exploitable b/c attacker frequently can affect uninit
values with spraying techniques. However, for these exploitability depends on how exactly the uninit value
is used in the code, and what it affects.
Information leaks are exploitable on their own and should be classified as such. A bug that copies kernel
memory contents to userspace (e.g. an out-of-bounds read whose result is returned to the caller, or
uninitialized stack/heap bytes written to a user buffer) is exploitable: it can reveal kernel pointer
values and defeat KASLR, expose sensitive data such as cryptographic keys or other processes' memory, and
serves as a necessary building block in most modern kernel privilege-escalation exploit chains. Do not classify
an information leak as non-exploitable solely because it does not directly cause a memory write or control-flow
hijack; the leak itself is the exploit primitive.
Think of what happens after the bug is triggered. Some bugs cause kernel panic and halt execution,
they are harder to exploit. For example, BUG reports halts the kernel. However, WARNING reports don't halt
execution in production builds. Debug bug detection tools (like KASAN, KMSAN, KCSAN, UBSAN) are also not enabled
in production builds, so attacker can freely exploit these bugs w/o being detected by these tools.
If you see an integer overflow, think how the overflowed value used later (if it's used as allocation size,
or an array index). If you see an out-of-bounds read, think if it's followed by an out-of-bounds write as well.
Some KCSAN data-races may be exploitable by skilled attackers as well. Think what data structures got corrupted
as the result of data races and how. However, note that kernel has lots of "benign" data races that don't lead
to any runtime misbehavior at all.
* Denial Of Service:
Determine if the bug can result in denial-of-service. Most bugs can, since they cause system crash,
hangs, deadlocks, or resource leaks. This is mostly applicable to WARNING bugs that won't cause system crash
in production. For these think what will be consequences of the violation of the kernel assumptions flagged
by the WARNING. In some cases the unexpected condition is also properly handled by the normal control flow
(e.g. with "if (WARN_ON(...))"), these won't cause denial-of-service. If the condition is not handled,
then it may or may not cause denial-of-service.
* Accessible From Unprivileged Processes:
Determine if the bug can be reached from a typical (non-root) user process that does NOT have any special capabilities
(like CAP_SYS_ADMIN, CAP_NET_ADMIN, CAP_NET_RAW, CAP_PERFMON) or access to device nodes restricted to root.
Assume that unprivileged_bpf_disabled=1, that is eBPF loading is not accessible. However, cBPF (classical BPF)
is still accessible to non-root processes.
Assume that user namespaces are not accessible, that is, the process cannot get the mentioned capabilities even
within a new user namespace (checked by ns_capable() function in the kernel sources).
* Accessible From User Namespaces:
Determine if the bug can be reached within a user-namespace where the process has all capabilities
(including CAP_SYS_ADMIN, CAP_NET_ADMIN, CAP_NET_RAW, CAP_PERFMON). Such capabilities are checked with ns_capable()
function in the kernel sources.
* VM Guest Trigger:
Determine if the bug can be triggered from the context of a typical KVM guest (e.g., set up by a QEMU VMM).
Consider accesses to standard Linux host paravirtualized features (virtio-blk, virtio-net, etc.),
and handling of VM exits in the KVM code.
* VM Host Trigger in The Confidential Computing Context:
Determine if the bug can be triggered in a confidential computing guest kernel from the context of a KVM host.
Consider access to standard Linux guest paravirtualized features (virtio-blk, virtio-net, etc.).
* Ethernet Network Trigger:
Determine if the bug can be triggered by processing ingress network Ethernet traffic, either directly (network stack)
or via drivers exposed to network data.
* Other Remote Trigger:
Determine if the bug can be triggered by processing remote traffic other than Ethernet (Wifi, Bluetooth, NFC, etc).
* Peripheral Trigger:
Determine if the bug can be triggered via an untrusted peripheral device that can be physically plugged
into a system, such as a USB device or a niche hardware driver handling external hardware inputs.
This is particularly important for mobile and desktop environments where users can plug in unknown devices.
* Malicious Filesystem Trigger:
Determine if the bug can be triggered by the kernel mounting and parsing a malicious filesystem image.
This is highly critical for Desktop and Mobile environments where external media or downloaded images
might be auto-mounted.
Don't make assumptions about the kernel source code (it may be different from what you assume it is).
Extensively use the provided code access tools (codesearch-*, git-*, grepper, etc)
to examine the actual source code, and confirm any assumptions.
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt:
The kernel bug report is:
rtrs_client L2021: <s+>: CM error (CM event: address error, err: -ENODEV)
8<--- cut here ---
Unable to handle kernel NULL pointer dereference at virtual address 00000000 when read
[00000000] *pgd=80000080004003, *pmd=00000000
Internal error: Oops: 205 [#1] SMP ARM
Modules linked in:
CPU: 0 UID: 0 PID: 8503 Comm: kworker/u8:4 Tainted: G L syzkaller #0 PREEMPT
Tainted: [L]=SOFTLOCKUP
Hardware name: ARM-Versatile Express
Workqueue: ib_addr process_one_req
PC is at mmiocpy+0x48/0x330 arch/arm/lib/copy_template.S:105
LR is at do_trace_event_raw_event_rtrs_clt_conn_class drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h:36 [inline]
LR is at trace_event_raw_event_rtrs_clt_conn_class+0xb0/0x11c drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h:36
pc : [<81b3cc28>] lr : [<813ce4f0>] psr: 20000113
sp : dfc29c4c ip : 00000000 fp : dfc29ca4
r10: 861cd010 r9 : 861cd224 r8 : 861cd1fc
r7 : 861cd000 r6 : 8303ba10 r5 : 875e3d40 r4 : 87150c00
r3 : ffffffff r2 : 0000007f r1 : 00000000 r0 : 87024680
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 30c5387d Table: 861dee80 DAC: fffffffd
Register r0 information: non-slab/vmalloc memory
Register r1 information: NULL pointer
Register r2 information: non-paged memory
Register r3 information: non-paged memory
Register r4 information: slab kmalloc-1k start 87150c00 pointer offset 0 size 1024
Register r5 information: slab task_struct start 875e3d40 pointer offset 0 size 3136
Register r6 information: slab trace_event_file start 8303ba10 pointer offset 0 size 56
Register r7 information: slab kmalloc-1k start 861cd000 pointer offset 0 size 1024
Register r8 information: slab kmalloc-1k start 861cd000 pointer offset 508 size 1024
Register r9 information: slab kmalloc-1k start 861cd000 pointer offset 548 size 1024
Register r10 information: slab kmalloc-1k start 861cd000 pointer offset 16 size 1024
Register r11 information: 2-page vmalloc region starting at 0xdfc28000 allocated at kernel_clone+0xc4/0x43c kernel/fork.c:2766
Register r12 information: NULL pointer
Process kworker/u8:4 (pid: 8503, stack limit = 0xdfc28000)
Stack: (0xdfc29c4c to 0xdfc2a000)
9c40: 875e3d40 8303ba10 861cd1fc 861cd224 87024680
9c60: 87150c00 813ce4f0 860c8680 8301ea80 8702465c 8303ba10 87024664 00000000
9c80: 00000000 232c0941 802eb208 8617b148 87150c00 dfc29cc0 dfc29cbc dfc29ca8
9ca0: 813ce2d0 813ce44c 828cb740 87150c00 dfc29cdc dfc29cc0 813cae30 813ce2a8
9cc0: ffffff8f 860c8680 87150c00 861cd000 dfc29d74 dfc29ce0 813cc280 813cad78
9ce0: dfc29d14 dfc29cf0 803b7178 861cd000 875e3d40 8303b5e8 dfc29db8 861cd1fc
9d00: 861cd224 861cd010 dfc29d54 dfc29d18 81372b9c 803a910c 8022cc00 8301ea80
9d20: 83022e84 8303b5e8 83022e88 00000000 00000000 232c0941 8617b788 861cd000
9d40: dfc29db8 232c0941 dfc29d74 861cd000 dfc29db8 828cb740 dfc29d78 861cd1fc
9d60: 861cd224 861cd010 dfc29d9c dfc29d78 81369674 813cc208 861cd000 87312008
9d80: 00000001 00000010 861cd1fc 861cd224 dfc29ec4 dfc29da0 8136ea60 81369658
9da0: dfc29dcc dfc29db0 80293fc8 802a93e8 dfc29dcc ffffffed 00000001 ffffffed
9dc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9de0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9e00: 00000000 00000000 00000000 00000000 803a032c a5860002 00000000 00000000
9e20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9e40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9e60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9e80: 00000000 00000000 00000000 00000000 00000000 232c0941 83012a00 87312118
9ea0: 87312008 87312000 83012a00 828cb740 875e3d40 83f59805 dfc29ef4 dfc29ec8
9ec0: 81335ed0 8136e944 83022e74 00000000 00000000 232c0941 86644900 87312118
9ee0: 83f59800 83012a00 dfc29f4c dfc29ef8 802772b8 81335ea0 86644930 86644930
9f00: dfc29f34 dfc29f10 802739e0 80966f18 87312118 00000000 86644900 00000000
9f20: 875e3d40 86644900 83012a00 83012a20 82a03d80 875e3d40 86644930 83012a00
9f40: dfc29f84 dfc29f50 80277f64 802770fc 82a03d80 83012a5c 802803bc 877d3540
9f60: 875e3d40 80277df8 86644900 86644800 dfca5e88 00000000 dfc29fac dfc29f88
9f80: 802827b4 80277e04 877d3540 80282698 00000000 00000000 00000000 00000000
9fa0: 00000000 dfc29fb0 80200114 802826a4 00000000 00000000 00000000 00000000
9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
Call trace:
[<813ce440>] (trace_event_raw_event_rtrs_clt_conn_class) from [<813ce2d0>] (__traceiter_rtrs_rdma_error_recovery+0x34/0x48 drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h:78)
r6:dfc29cc0 r5:87150c00 r4:8617b148
[<813ce29c>] (__traceiter_rtrs_rdma_error_recovery) from [<813cae30>] (__do_trace_rtrs_rdma_error_recovery drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h:78 [inline])
[<813ce29c>] (__traceiter_rtrs_rdma_error_recovery) from [<813cae30>] (trace_rtrs_rdma_error_recovery drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h:78 [inline])
[<813ce29c>] (__traceiter_rtrs_rdma_error_recovery) from [<813cae30>] (rtrs_rdma_error_recovery+0xc4/0x170 drivers/infiniband/ulp/rtrs/rtrs-clt.c:311)
r5:87150c00 r4:828cb740
[<813cad6c>] (rtrs_rdma_error_recovery) from [<813cc280>] (rtrs_clt_rdma_cm_handler+0x84/0x944 drivers/infiniband/ulp/rtrs/rtrs-clt.c:2065)
r7:861cd000 r6:87150c00 r5:860c8680 r4:ffffff8f
[<813cc1fc>] (rtrs_clt_rdma_cm_handler) from [<81369674>] (cma_cm_event_handler+0x28/0x1e0 drivers/infiniband/core/cma.c:2181)
r10:861cd010 r9:861cd224 r8:861cd1fc r7:dfc29d78 r6:828cb740 r5:dfc29db8
r4:861cd000
[<8136964c>] (cma_cm_event_handler) from [<8136ea60>] (addr_handler+0x128/0x2b8 drivers/infiniband/core/cma.c:3550)
r9:861cd224 r8:861cd1fc r7:00000010 r6:00000001 r5:87312008 r4:861cd000
[<8136e938>] (addr_handler) from [<81335ed0>] (process_one_req+0x3c/0x154 drivers/infiniband/core/addr.c:624)
r10:83f59805 r9:875e3d40 r8:828cb740 r7:83012a00 r6:87312000 r5:87312008
r4:87312118
[<81335e94>] (process_one_req) from [<802772b8>] (process_one_work+0x1c8/0x580 kernel/workqueue.c:3322)
r7:83012a00 r6:83f59800 r5:87312118 r4:86644900
[<802770f0>] (process_one_work) from [<80277f64>] (process_scheduled_works kernel/workqueue.c:3405 [inline])
[<802770f0>] (process_one_work) from [<80277f64>] (worker_thread+0x16c/0x318 kernel/workqueue.c:3486)
r10:83012a00 r9:86644930 r8:875e3d40 r7:82a03d80 r6:83012a20 r5:83012a00
r4:86644900
[<80277df8>] (worker_thread) from [<802827b4>] (kthread+0x11c/0x154 kernel/kthread.c:436)
r10:00000000 r9:dfca5e88 r8:86644800 r7:86644900 r6:80277df8 r5:875e3d40
r4:877d3540
[<80282698>] (kthread) from [<80200114>] (ret_from_fork+0x14/0x20 arch/arm/kernel/entry-common.S:137)
Exception stack(0xdfc29fb0 to 0xdfc29ff8)
9fa0: 00000000 00000000 00000000 00000000
9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:80282698 r4:877d3540
Code: ba000002 f5d1f03c f5d1f05c f5d1f07c (e8b15378)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: ba000002 blt 0x10
4: f5d1f03c pld [r1, #60] @ 0x3c
8: f5d1f05c pld [r1, #92] @ 0x5c
c: f5d1f07c pld [r1, #124] @ 0x7c
* 10: e8b15378 ldm r1!, {r3, r4, r5, r6, r8, r9, ip, lr} <-- trapping instruction
Reply: Based on the analysis of the bug report and the source code, here is the assessment of the security impact:
**Bug Mechanism:**
The bug is a NULL pointer dereference in the `trace_rtrs_rdma_error_recovery` tracepoint.
When an RDMA connection attempt fails (e.g., the remote server rejects the connection or is unreachable), the RDMA CM event handler `rtrs_clt_rdma_cm_handler` is invoked asynchronously. This handler calls `rtrs_rdma_error_recovery`, which in turn triggers the `trace_rtrs_rdma_error_recovery` tracepoint.
The tracepoint attempts to copy the session name using `memcpy(__entry->sessname, kobject_name(&clt_path->kobj), NAME_MAX)`. However, `clt_path->kobj` is only initialized in `rtrs_clt_create_path_files()`, which is called *after* the connection is successfully established (i.e., after `init_path()` returns successfully).
Because the connection failed, `clt_path->kobj` remains uninitialized (zeroed out during allocation), meaning `kobj->name` is `NULL`. The tracepoint then passes this `NULL` pointer to `memcpy`, resulting in a kernel oops when it tries to read from address 0.
**Exploitability:**
This is strictly a read from a `NULL` pointer (`memcpy` reading from `NULL`). On modern Linux systems, address 0 is unmapped (protected by `mmap_min_addr`), so the read will reliably cause a page fault and a kernel oops. It does not lead to memory corruption, information leaks, or privilege escalation. Therefore, it is **not exploitable**.
**Denial of Service:**
The kernel oops will kill the RDMA CM thread or the workqueue worker thread handling the event. This can leave locks held, leak resources, and hang the RNBD/RTRS subsystem, resulting in a **Denial of Service**.
**Privilege Requirements:**
To trigger this bug, a user must initiate an RNBD (RDMA Network Block Device) connection. This is done by writing to the `/sys/class/rnbd-client/ctl/map_device` sysfs file (or similar sysfs interfaces). These sysfs files are owned by root and have `0644` permissions, meaning only the global root user can write to them. Therefore, the bug **cannot be triggered by unprivileged users** or from within **user namespaces** (as sysfs is not writable in this context).
**Network Trigger:**
If a root user attempts to connect to a remote server, that server can intentionally trigger the bug by rejecting the RDMA connection (sending an RDMA CM reject or error packet over RoCE/Ethernet). Because the crash is ultimately triggered by processing this ingress network packet during the connection handshake, it qualifies as an **Ethernet Network Trigger**.
|
| 6/2 |
2026/09/04 00:57 |
llm |
expert |
0m
Model:
Tokens:
input: 10870
output: 31
thoughts: 222
Thoughts: **Analyzing a Null Pointer Dereference in the RDMA Connection Tracking Code**
Okay, so the bug report indicates a critical issue: a NULL pointer dereference. Specifically, it's happening in the `mmiocpy` function, which is being called from `do_trace_event_raw_event_rtrs_clt_conn_class` within the `rtrs-clt-trace.h` file. I immediately recognize this as something that could bring down the whole system; a NULL pointer dereference in kernel space is no joke.
The trace is helpful β it outlines the path the execution took. Let me break it down: we've got `trace_event_raw_event_rtrs_clt_conn_class` initiating things, and the path appears to be going through RDMA error recovery handling: `__traceiter_rtrs_rdma_error_recovery`, `trace_rtrs_rdma_error_recovery`, then `rtrs_rdma_error_recovery`. This calls `rtrs_clt_rdma_cm_handler` which passes control to the core connection manager code `cma_cm_event_handler`. Within that, the `addr_handler` deals with the addresses and it gets fed to the `process_one_req` function, which eventually goes into the standard worker thread setup. I need to keep this stack in mind. It's almost certain the problem will be somewhere along this execution path.
Now, my next step is to examine that `rtrs-clt-trace.h` file around line 36. This is where the root cause is, or at least the point where the invalid pointer is being used. I'll be looking for any place where a pointer could be uninitialized, freed prematurely, or otherwise become invalid before being used in that `mmiocpy` call. Given the context of RDMA, I will have to be looking closely at any interactions with the memory management, particularly around connection setup or teardown, and error recovery since that part of the code is being triggered. Time to dive into the code...
|
| 7/2 |
2026/09/04 00:57 |
tool |
grepper |
0m
Error:
Args: map[Expression:trace_event_raw_event_rtrs_clt_conn_class]
Results:
|
| 8/2 |
2026/09/04 00:57 |
llm |
expert |
0m
Model:
Tokens:
input: 11586
output: 48
thoughts: 65
Thoughts: Okay, here's my interpretation of that thought process, tailored for an expert audience:
**Tracepoint Investigation Commences**
Right, a tracepoint. Based on the mention, it's either `rtrs_clt_conn_class` or `rtrs_rdma_error_recovery`. Given the potential for RDMA issues, I'm leaning toward the latter being more likely to be relevant. However, let's not jump to conclusions. First things first, I need to get the context. A quick check of `drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h` is the immediate next step. This should contain the relevant definitions, arguments, and hopefully, some commentary regarding the tracepoints' intended use. It's the standard entry point to understand what's actually being captured and why. It'll be the starting point to understand the tracepoint's information, and plan a debugging investigation accordingly. From there I can determine how it's being used, what data is being logged, and then I can apply the relevant filters to look at the appropriate parts.
|
| 9/2 |
2026/09/04 00:57 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h FirstLine:1 LineCount:100]
Results: map[Contents: 1: /* SPDX-License-Identifier: GPL-2.0+ */
2: /*
3: * RDMA Network Block Driver
4: *
5: * Copyright (c) 2022 1&1 IONOS SE. All rights reserved.
6: */
7: #undef TRACE_SYSTEM
8: #define TRACE_SYSTEM rtrs_clt
9:
10: #if !defined(_TRACE_RTRS_CLT_H) || defined(TRACE_HEADER_MULTI_READ)
11: #define _TRACE_RTRS_CLT_H
12:
13: #include <linux/tracepoint.h>
14:
15: struct rtrs_clt_path;
16: struct rtrs_clt_sess;
17:
18: TRACE_DEFINE_ENUM(RTRS_CLT_CONNECTING);
19: TRACE_DEFINE_ENUM(RTRS_CLT_CONNECTING_ERR);
20: TRACE_DEFINE_ENUM(RTRS_CLT_RECONNECTING);
21: TRACE_DEFINE_ENUM(RTRS_CLT_CONNECTED);
22: TRACE_DEFINE_ENUM(RTRS_CLT_CLOSING);
23: TRACE_DEFINE_ENUM(RTRS_CLT_CLOSED);
24: TRACE_DEFINE_ENUM(RTRS_CLT_DEAD);
25:
26: #define show_rtrs_clt_state(x) \
27: __print_symbolic(x, \
28: { RTRS_CLT_CONNECTING, "CONNECTING" }, \
29: { RTRS_CLT_CONNECTING_ERR, "CONNECTING_ERR" }, \
30: { RTRS_CLT_RECONNECTING, "RECONNECTING" }, \
31: { RTRS_CLT_CONNECTED, "CONNECTED" }, \
32: { RTRS_CLT_CLOSING, "CLOSING" }, \
33: { RTRS_CLT_CLOSED, "CLOSED" }, \
34: { RTRS_CLT_DEAD, "DEAD" })
35:
36: DECLARE_EVENT_CLASS(rtrs_clt_conn_class,
37: TP_PROTO(struct rtrs_clt_path *clt_path),
38:
39: TP_ARGS(clt_path),
40:
41: TP_STRUCT__entry(
42: __field(int, state)
43: __field(int, reconnect_attempts)
44: __field(int, max_reconnect_attempts)
45: __field(int, fail_cnt)
46: __field(int, success_cnt)
47: __array(char, sessname, NAME_MAX)
48: ),
49:
50: TP_fast_assign(
51: struct rtrs_clt_sess *clt = clt_path->clt;
52:
53: __entry->state = clt_path->state;
54: __entry->reconnect_attempts = clt_path->reconnect_attempts;
55: __entry->max_reconnect_attempts = clt->max_reconnect_attempts;
56: __entry->fail_cnt = clt_path->stats->reconnects.fail_cnt;
57: __entry->success_cnt = clt_path->stats->reconnects.successful_cnt;
58: memcpy(__entry->sessname, kobject_name(&clt_path->kobj), NAME_MAX);
59: ),
60:
61: TP_printk("RTRS-CLT: sess='%s' state=%s attempts='%d' max-attempts='%d' fail='%d' success='%d'",
62: __entry->sessname,
63: show_rtrs_clt_state(__entry->state),
64: __entry->reconnect_attempts,
65: __entry->max_reconnect_attempts,
66: __entry->fail_cnt,
67: __entry->success_cnt
68: )
69: );
70:
71: #define DEFINE_CLT_CONN_EVENT(name) \
72: DEFINE_EVENT(rtrs_clt_conn_class, rtrs_##name, \
73: TP_PROTO(struct rtrs_clt_path *clt_path), \
74: TP_ARGS(clt_path))
75:
76: DEFINE_CLT_CONN_EVENT(clt_reconnect_work);
77: DEFINE_CLT_CONN_EVENT(clt_close_conns);
78: DEFINE_CLT_CONN_EVENT(rdma_error_recovery);
79:
80: #endif /* _TRACE_RTRS_CLT_H */
81:
82: #undef TRACE_INCLUDE_PATH
83: #define TRACE_INCLUDE_PATH .
84: #define TRACE_INCLUDE_FILE rtrs-clt-trace
85: #include <trace/define_trace.h>
86:
]
|
| 10/2 |
2026/09/04 00:57 |
llm |
expert |
0m
Model:
Tokens:
input: 13350
output: 22
thoughts: 85
Thoughts: **Debugging a Tricky Memory Corruption**
Okay, so the kernel is crashing in `memcpy`, specifically when trying to copy the session name into `__entry->sessname`. The line causing trouble is `memcpy(__entry->sessname, kobject_name(&clt_path->kobj), NAME_MAX);`. My first thought is: Did `kobject_name` return a NULL pointer? That's the most likely source of a memory access violation in a `memcpy`. I know this function is supposed to extract the name from a kobject.
Hold on a second... I need to check how `kobject_name` actually works. Oh, right, it just returns `kobj->name`. Ah, *that's* the problem. If `kobj->name` is NULL, then `memcpy` will be trying to dereference a NULL pointer, leading to the crash. I need to investigate the circumstances under which `kobj->name` could be NULL. I need to trace this back.
|
| 11/2 |
2026/09/04 00:58 |
tool |
codesearch-definition-source |
0m
Args:
Results: map[SourceCode: 87: static inline const char *kobject_name(const struct kobject *kobj)
88: {
89: return kobj->name;
90: }
SourceFile:include/linux/kobject.h]
|
| 12/2 |
2026/09/04 00:58 |
llm |
expert |
0m
Model:
Tokens:
input: 13752
output: 47
thoughts: 79
Thoughts: **Debugging a NULL Pointer in the RDMA Client Path**
Okay, here's what's running through my head. I'm seeing a `kobj->name` that's NULL, which immediately throws up a red flag. The critical piece I'm focusing on is `clt_path->kobj.name`. Why is that specifically NULL? That's the real puzzle. My immediate hunch is that perhaps `clt_path` isn't being properly initialized before this access. It's a classic initialization problem, something that's bitten me before. The best path forward is to dig into the `rtrs_rdma_error_recovery` function, located in `drivers/infiniband/ulp/rtrs/rtrs-clt.c`. That function's likely the key to understanding how `clt_path` is created or handled in that context. Time to roll up my sleeves and dive into the code.
|
| 13/2 |
2026/09/04 00:58 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/ulp/rtrs/rtrs-clt.c FirstLine:290 LineCount:50]
Results: map[Contents: 290: }
291:
292: static bool rtrs_clt_change_state_from_to(struct rtrs_clt_path *clt_path,
293: enum rtrs_clt_state old_state,
294: enum rtrs_clt_state new_state)
295: {
296: bool changed = false;
297:
298: spin_lock_irq(&clt_path->state_wq.lock);
299: if (clt_path->state == old_state)
300: changed = rtrs_clt_change_state(clt_path, new_state);
301: spin_unlock_irq(&clt_path->state_wq.lock);
302:
303: return changed;
304: }
305:
306: static void rtrs_clt_stop_and_destroy_conns(struct rtrs_clt_path *clt_path);
307: static void rtrs_rdma_error_recovery(struct rtrs_clt_con *con)
308: {
309: struct rtrs_clt_path *clt_path = to_clt_path(con->c.path);
310:
311: trace_rtrs_rdma_error_recovery(clt_path);
312:
313: if (rtrs_clt_change_state_from_to(clt_path,
314: RTRS_CLT_CONNECTED,
315: RTRS_CLT_RECONNECTING)) {
316: queue_work(rtrs_wq, &clt_path->err_recovery_work);
317: } else {
318: /*
319: * Error can happen just on establishing new connection,
320: * so notify waiter with error state, waiter is responsible
321: * for cleaning the rest and reconnect if needed.
322: */
323: rtrs_clt_change_state_from_to(clt_path,
324: RTRS_CLT_CONNECTING,
325: RTRS_CLT_CONNECTING_ERR);
326: }
327: }
328:
329: static void rtrs_clt_fast_reg_done(struct ib_cq *cq, struct ib_wc *wc)
330: {
331: struct rtrs_clt_con *con = to_clt_con(wc->qp->qp_context);
332:
333: if (wc->status != IB_WC_SUCCESS) {
334: rtrs_err_rl(con->c.path, "Failed IB_WR_REG_MR: %s\n",
335: ib_wc_status_msg(wc->status));
336: rtrs_rdma_error_recovery(con);
337: }
338: }
339:
]
|
| 14/2 |
2026/09/04 00:58 |
llm |
expert |
0m
Model:
Tokens:
input: 14945
output: 48
thoughts: 80
Thoughts: Here's my take on the thought process, as if it were my own:
**Analyzing an RDMA Error Recovery Path**
Okay, so I've hit a point where the kernel's calling `trace_rtrs_rdma_error_recovery(clt_path)`. This immediately tells me we're within the RDMA error recovery mechanisms of the Reliable Transport Service (RTRS) client-side code. This tracepoint is a valuable signal, basically a canary in the coal mine indicating that something went south with the RDMA communication. Now I need to figure out *why* and what the implications are.
The more detailed trace reveals the origin, specifically `rtrs_rdma_error_recovery` got invoked from within `rtrs_clt_rdma_cm_handler`, and it happened at line 2065 in `drivers/infiniband/ulp/rtrs/rtrs-clt.c`. That places the recovery process squarely in the RDMA connection management (CM) handler on the client side. That's a good breadcrumb; a CM handler usually means we're dealing with an event related to the connection itself β an established connection that's throwing an error.
I now need to see what this function does and what specific errors trigger this. A more thorough analysis is needed to identify the potential culprits. Is the network fabric acting up? Are there some issues with memory registration on either side, which is very common? Or maybe some issues in the control plane's handling of RDMA context? From here, I'll probably look at the context passed to the handler: `clt_path`, its state, and what other error data is available. My focus will be on pinpointing the root cause and checking the effectiveness of this recovery strategy.
|
| 15/2 |
2026/09/04 00:58 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/ulp/rtrs/rtrs-clt.c FirstLine:2050 LineCount:50]
Results: map[Contents:2050: } else if (ev->status > 0) {
2051: rtrs_err(s, "Unexpected RDMA CM error (CM event: %s, err: %s)\n",
2052: rdma_event_msg(ev->event),
2053: rdma_reject_msg(cm_id, ev->status));
2054: }
2055: cm_err = -ECONNRESET;
2056: break;
2057: }
2058:
2059: if (cm_err) {
2060: /*
2061: * cm error makes sense only on connection establishing,
2062: * in other cases we rely on normal procedure of reconnecting.
2063: */
2064: flag_error_on_conn(con, cm_err);
2065: rtrs_rdma_error_recovery(con);
2066: }
2067:
2068: return 0;
2069: }
2070:
2071: /* The caller should do the cleanup in case of error */
2072: static int create_cm(struct rtrs_clt_con *con)
2073: {
2074: struct rtrs_path *s = con->c.path;
2075: struct rtrs_clt_path *clt_path = to_clt_path(s);
2076: struct rdma_cm_id *cm_id;
2077: int err;
2078:
2079: cm_id = rdma_create_id(&init_net, rtrs_clt_rdma_cm_handler, con,
2080: clt_path->s.dst_addr.ss_family == AF_IB ?
2081: RDMA_PS_IB : RDMA_PS_TCP, IB_QPT_RC);
2082: if (IS_ERR(cm_id)) {
2083: rtrs_err(s, "Failed to create CM ID, err: %pe\n", cm_id);
2084: return PTR_ERR(cm_id);
2085: }
2086: con->c.cm_id = cm_id;
2087: con->cm_err = 0;
2088: /* allow the port to be reused */
2089: err = rdma_set_reuseaddr(cm_id, 1);
2090: if (err != 0) {
2091: rtrs_err(s, "Set address reuse failed, err: %pe\n", ERR_PTR(err));
2092: return err;
2093: }
2094: err = rdma_resolve_addr(cm_id, (struct sockaddr *)&clt_path->s.src_addr,
2095: (struct sockaddr *)&clt_path->s.dst_addr,
2096: RTRS_CONNECT_TIMEOUT_MS);
2097: if (err) {
2098: rtrs_err(s, "Failed to resolve address, err: %pe\n", ERR_PTR(err));
2099: return err;
]
|
| 16/2 |
2026/09/04 00:58 |
llm |
expert |
0m
Model:
Tokens:
input: 16328
output: 48
thoughts: 39
Thoughts: Okay, here's my interpretation of those thoughts, summarized from an expert's perspective:
**Diving into the RDMA Connection Manager Handler**
Alright, the debugging has led us to `rtrs_clt_rdma_cm_handler`. That's a key function, the likely epicenter of this crash. Now, let's get down to brass tacks. I need to get a full view of the `rtrs_clt_rdma_cm_handler` function's code. Knowing the context of that RDMA connection manager handler will be essential to understanding what specifically is causing the crash. I need to understand its control flow, the data structures it manipulates, and how it interacts with the underlying hardware or the kernel. Only then can I pinpoint the root cause of the error. A quick and dirty examination of the code and any involved data structures should reveal the likely source of the crash, and then I can dig deeper.
|
| 17/2 |
2026/09/04 00:58 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/ulp/rtrs/rtrs-clt.c FirstLine:1980 LineCount:70]
Results: map[Contents:1980: cm_err = rtrs_rdma_addr_resolved(con);
1981: break;
1982: case RDMA_CM_EVENT_ROUTE_RESOLVED:
1983: cm_err = rtrs_rdma_route_resolved(con);
1984: break;
1985: case RDMA_CM_EVENT_ESTABLISHED:
1986: cm_err = rtrs_rdma_conn_established(con, ev);
1987: if (!cm_err) {
1988: /*
1989: * Report success and wake up. Here we abuse state_wq,
1990: * i.e. wake up without state change, but we set cm_err.
1991: */
1992: flag_success_on_conn(con);
1993: wake_up(&clt_path->state_wq);
1994: return 0;
1995: }
1996: break;
1997: case RDMA_CM_EVENT_REJECTED:
1998: cm_err = rtrs_rdma_conn_rejected(con, ev);
1999: break;
2000: case RDMA_CM_EVENT_DISCONNECTED:
2001: /* No message for disconnecting */
2002: cm_err = -ECONNRESET;
2003: break;
2004: case RDMA_CM_EVENT_CONNECT_ERROR:
2005: case RDMA_CM_EVENT_UNREACHABLE:
2006: case RDMA_CM_EVENT_ADDR_CHANGE:
2007: case RDMA_CM_EVENT_TIMEWAIT_EXIT:
2008: if (ev->status < 0) {
2009: rtrs_wrn(s, "CM error (CM event: %s, err: %pe)\n",
2010: rdma_event_msg(ev->event), ERR_PTR(ev->status));
2011: } else if (ev->status > 0) {
2012: rtrs_wrn(s, "CM error (CM event: %s, err: %s)\n",
2013: rdma_event_msg(ev->event),
2014: rdma_reject_msg(cm_id, ev->status));
2015: }
2016: cm_err = -ECONNRESET;
2017: break;
2018: case RDMA_CM_EVENT_ADDR_ERROR:
2019: case RDMA_CM_EVENT_ROUTE_ERROR:
2020: if (ev->status < 0) {
2021: rtrs_wrn(s, "CM error (CM event: %s, err: %pe)\n",
2022: rdma_event_msg(ev->event),
2023: ERR_PTR(ev->status));
2024: } else if (ev->status > 0) {
2025: rtrs_wrn(s, "CM error (CM event: %s, err: %s)\n",
2026: rdma_event_msg(ev->event),
2027: rdma_reject_msg(cm_id, ev->status));
2028: }
2029: cm_err = -EHOSTUNREACH;
2030: break;
2031: case RDMA_CM_EVENT_DEVICE_REMOVAL:
2032: /*
2033: * Device removal is a special case. Queue close and return 0.
2034: */
2035: if (ev->status < 0) {
2036: rtrs_wrn_rl(s, "CM event: %s, status: %pe\n",
2037: rdma_event_msg(ev->event),
2038: ERR_PTR(ev->status));
2039: } else if (ev->status > 0) {
2040: rtrs_wrn_rl(s, "CM event: %s, status: %s\n",
2041: rdma_event_msg(ev->event),
2042: rdma_reject_msg(cm_id, ev->status));
2043: }
2044: rtrs_clt_close_conns(clt_path, false);
2045: return 0;
2046: default:
2047: if (ev->status < 0) {
2048: rtrs_err(s, "Unexpected RDMA CM error (CM event: %s, err: %pe)\n",
2049: rdma_event_msg(ev->event), ERR_PTR(ev->status));
]
|
| 18/2 |
2026/09/04 00:58 |
llm |
expert |
0m
Model:
Tokens:
input: 17888
output: 25
thoughts: 148
Thoughts: **Debugging a Kernel Crash in RDMA Client Connection Handling**
Okay, so I'm digging into this kernel crash, and it looks like it's happening inside `rtrs_clt_rdma_cm_handler`. The trigger seems to be a non-zero `cm_err`, which then leads to a call to `rtrs_rdma_error_recovery(con)`. That's where things get interesting, as `rtrs_rdma_error_recovery` then calls `trace_rtrs_rdma_error_recovery(clt_path)`. The tracepoint, it appears, is trying to access `kobject_name(&clt_path->kobj)`. That function is then crashing because `clt_path->kobj.name` is NULL.
My immediate question is, when is `clt_path->kobj` actually initialized? It's looking like this is a likely cause for an uninitialized data access, and therefore the crash. I need to trace back the allocation and initialization of `rtrs_clt_path` to figure out if we're missing an initialization step somewhere or if the path is being used before it is properly set up. Let's see what's happening there.
|
| 19/2 |
2026/09/04 00:58 |
tool |
codesearch-find-references |
0m
Args:
Results: map[References:[map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:__bpf_trace_rtrs_clt_conn_class SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:36] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:__do_trace_rtrs_clt_close_conns SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:77] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:__do_trace_rtrs_clt_reconnect_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:76] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:__do_trace_rtrs_rdma_error_recovery SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:78] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:__probestub_rtrs_clt_close_conns SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:77] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:__probestub_rtrs_clt_reconnect_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:76] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:__probestub_rtrs_rdma_error_recovery SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:78] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:__traceiter_rtrs_clt_close_conns SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:77] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:__traceiter_rtrs_clt_close_conns SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:77] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:__traceiter_rtrs_clt_reconnect_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:76] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:__traceiter_rtrs_clt_reconnect_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:76] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:__traceiter_rtrs_rdma_error_recovery SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:78] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:__traceiter_rtrs_rdma_error_recovery SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:78] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:alloc_path SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1534] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:alloc_path_reqs SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1360] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:check_trace_callback_type_rtrs_clt_close_conns SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:77] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:check_trace_callback_type_rtrs_clt_reconnect_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:76] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:check_trace_callback_type_rtrs_rdma_error_recovery SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:78] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:complete_rdma_req SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:384] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:create_cm SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2075] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:create_con SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1612] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:create_con_cq_qp SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1644] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:destroy_con SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1635] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:destroy_con_cq_qp SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1733] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:do_perf_trace_rtrs_clt_conn_class SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:36] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:do_trace_event_raw_event_rtrs_clt_conn_class SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:36] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:fail_all_outstanding_reqs SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1315] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:flag_error_on_conn SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1960] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:flag_success_on_conn SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1910] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:free_path SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1603] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:free_path_reqs SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1342] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:get_next_path_min_inflight SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:822] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:get_next_path_min_inflight SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:824] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:get_next_path_min_latency SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:873] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:get_next_path_min_latency SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:875] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:get_next_path_rr SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:781] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:get_next_path_rr SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:782] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:init_conns SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2347] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:init_path SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2625] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:perf_trace_rtrs_clt_conn_class SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:36] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:post_recv_io SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:698] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:post_recv_path SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:715] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:process_info_rsp SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2428] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:process_io_rsp SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:492] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:query_fast_reg_mode SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1455] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:register_trace_prio_rtrs_clt_close_conns SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:77] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:register_trace_prio_rtrs_clt_reconnect_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:76] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:register_trace_prio_rtrs_rdma_error_recovery SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:78] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:register_trace_rtrs_clt_close_conns SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:77] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:register_trace_rtrs_clt_reconnect_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:76] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:register_trace_rtrs_rdma_error_recovery SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:78] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_add_path_to_arr SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2324] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_change_state SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:203] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_change_state_from_to SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:292] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_change_state_get_old SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1479] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_close SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2899] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_close SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2899] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_close_conns SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1947] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_close_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2337] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_close_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2339] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_close_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2339] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_close_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2339] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_create_path_files SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:425] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_create_path_from_sysfs SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:3121] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_cur_latency_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:363] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_cur_latency_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:365] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_cur_latency_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:365] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_cur_latency_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:365] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_destroy_path_files SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:478] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_disconnect_store SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:251] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_disconnect_store SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:253] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_disconnect_store SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:253] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_disconnect_store SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:253] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_dst_addr_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:395] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_dst_addr_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:398] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_dst_addr_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:398] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_dst_addr_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:398] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_err_recovery_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1517] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_err_recovery_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1521] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_err_recovery_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1521] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_err_recovery_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1521] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_failover_req SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1285] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_get_copy_req SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:999] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_get_next_path_or_null SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:762] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_get_req SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:983] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_hb_err_handler SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1497] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_hca_name_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:349] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_hca_name_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:351] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_hca_name_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:351] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_hca_name_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:351] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_hca_port_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:335] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_info_req_done SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2412] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_info_rsp_done SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2496] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_init_hb SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1503] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_init_req SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:949] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_is_connected SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:54] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_open SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2824] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_open SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2824] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_open SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2843] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_path_down SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2156] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_path_release SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:21] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_path_release SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:23] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_path_release SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:23] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_path_release SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:23] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_path_up SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2125] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_rdma_cm_handler SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1975] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_rdma_cq_direct SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:3074] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_rdma_done SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:604] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_read_req SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1174] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_reconnect_from_sysfs SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2915] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_reconnect_store SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:221] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_reconnect_store SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:224] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_reconnect_store SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:224] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_reconnect_store SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:224] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_reconnect_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2661] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_reconnect_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2665] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_reconnect_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2665] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_reconnect_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2665] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_recv_done SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:510] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_remove_path_from_arr SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2234] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_remove_path_from_arr SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2237] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_remove_path_from_arr SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2291] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_remove_path_from_arr SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2308] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_remove_path_from_arr SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2308] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_remove_path_from_sysfs SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2943] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_remove_path_store SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:278] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_remove_path_store SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:281] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_remove_path_store SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:281] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_remove_path_store SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:281] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_request SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:3014] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_rkey_rsp_done SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:524] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_src_addr_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:378] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_src_addr_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:381] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_src_addr_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:381] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_src_addr_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:381] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_state_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:199] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_state_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:201] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_state_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:201] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_state_show SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:201] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_stop_and_destroy_conns SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2171] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_update_all_stats SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-stats.c SourceLine:175] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_update_wc_stats SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-stats.c SourceLine:16] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_write_req SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1084] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_permit_to_clt_con SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:180] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_post_rdma_write_sg SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1023] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_post_send_rdma SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:461] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_rdma_conn_established SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1822] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_rdma_error_recovery SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:309] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_rdma_route_resolved SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:1787] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:rtrs_send_path_info SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2550] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:to_clt_path SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.h SourceLine:188] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:to_clt_path SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.h SourceLine:188] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:to_clt_path SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.h SourceLine:188] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:trace_call__rtrs_clt_close_conns SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:77] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:trace_call__rtrs_clt_reconnect_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:76] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:trace_call__rtrs_rdma_error_recovery SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:78] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:trace_event_get_offsets_rtrs_clt_conn_class SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:36] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:trace_event_raw_event_rtrs_clt_conn_class SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:36] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:trace_rtrs_clt_close_conns SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:77] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:trace_rtrs_clt_reconnect_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:76] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:trace_rtrs_rdma_error_recovery SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:78] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:unregister_trace_rtrs_clt_close_conns SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:77] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:unregister_trace_rtrs_clt_reconnect_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:76] map[ReferenceKind:uses ReferencingEntityKind:function ReferencingEntityName:unregister_trace_rtrs_rdma_error_recovery SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:78] map[ReferenceKind:uses ReferencingEntityKind:typedef ReferencingEntityName:btf_trace_rtrs_clt_close_conns SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:77] map[ReferenceKind:uses ReferencingEntityKind:typedef ReferencingEntityName:btf_trace_rtrs_clt_reconnect_work SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:76] map[ReferenceKind:uses ReferencingEntityKind:typedef ReferencingEntityName:btf_trace_rtrs_rdma_error_recovery SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h SourceLine:78]] TruncatedOutput:false]
|
| 20/2 |
2026/09/04 00:58 |
llm |
expert |
0m
Model:
Tokens:
input: 29690
output: 48
thoughts: 36
Thoughts: Okay, let's dive into this. Here's how I'd approach that line of code, as if it were my thought process:
**Diving into `alloc_path` in `rtrs-clt.c`**
Alright, I need to understand what's happening in `drivers/infiniband/ulp/rtrs/rtrs-clt.c`, specifically around line 1534. The function `alloc_path` is the focus. Since I'm in the infiniband space, I'm expecting this is handling some sort of path allocation. That probably involves resource management, potential device interactions, and setting up the communication channels for the remote transport request service (RTRS) client. I'll need to see how it's being used. Is this a critical allocation step? What's its return value? And more importantly, how does it handle potential errors? I'm going to look for any obvious race conditions. I want to know if there's any locking involved, whether it's related to memory allocation, or access to shared resources. Does this function potentially block? Could it impact performance or cause deadlocks? I will need to understand the data structures being passed in, and how they relate to the underlying infiniband hardware and software layers. I'll check its usage context to see where it gets called from and what it feeds into. Any related configuration parameters or global variables should also be noted. Let's dig in and see what `alloc_path` reveals.
|
| 21/2 |
2026/09/04 00:58 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/ulp/rtrs/rtrs-clt.c FirstLine:1525 LineCount:50]
Results: map[Contents:1525: queue_delayed_work(rtrs_wq, &clt_path->reconnect_dwork,
1526: msecs_to_jiffies(delay_ms +
1527: get_random_u32_below(RTRS_RECONNECT_SEED)));
1528: }
1529:
1530: static struct rtrs_clt_path *alloc_path(struct rtrs_clt_sess *clt,
1531: const struct rtrs_addr *path,
1532: size_t con_num, u32 nr_poll_queues)
1533: {
1534: struct rtrs_clt_path *clt_path;
1535: int err = -ENOMEM;
1536: int cpu;
1537: size_t total_con;
1538:
1539: clt_path = kzalloc_flex(*clt_path, stats, 1);
1540: if (!clt_path)
1541: goto err;
1542:
1543: /*
1544: * irqmode and poll
1545: * +1: Extra connection for user messages
1546: */
1547: total_con = con_num + nr_poll_queues + 1;
1548: clt_path->s.con = kzalloc_objs(*clt_path->s.con, total_con);
1549: if (!clt_path->s.con)
1550: goto err_free_path;
1551:
1552: clt_path->s.con_num = total_con;
1553: clt_path->s.irq_con_num = con_num + 1;
1554:
1555: mutex_init(&clt_path->init_mutex);
1556: uuid_gen(&clt_path->s.uuid);
1557: memcpy(&clt_path->s.dst_addr, path->dst,
1558: rdma_addr_size((struct sockaddr *)path->dst));
1559:
1560: /*
1561: * rdma_resolve_addr() passes src_addr to cma_bind_addr, which
1562: * checks the sa_family to be non-zero. If user passed src_addr=NULL
1563: * the sess->src_addr will contain only zeros, which is then fine.
1564: */
1565: if (path->src)
1566: memcpy(&clt_path->s.src_addr, path->src,
1567: rdma_addr_size((struct sockaddr *)path->src));
1568: strscpy(clt_path->s.sessname, clt->sessname,
1569: sizeof(clt_path->s.sessname));
1570: clt_path->clt = clt;
1571: clt_path->max_pages_per_mr = RTRS_MAX_SEGMENTS;
1572: init_waitqueue_head(&clt_path->state_wq);
1573: clt_path->state = RTRS_CLT_CONNECTING;
1574: atomic_set(&clt_path->connected_cnt, 0);
]
|
| 22/2 |
2026/09/04 00:58 |
llm |
expert |
0m
Model:
Tokens:
input: 31016
output: 30
thoughts: 49
Thoughts: Here's my take on the thought process, summarized as you requested:
**Digging into the `kobject` Initialization**
Okay, so I'm trying to trace the lifecycle of this `clt_path` structure. I remember seeing a call to `kobject_init_and_add` involving `clt_path->kobj` somewhere. That's a key part of the sysfs integration, so I need to understand where that's happening.
Let's cut the chase. I'll search the `rtrs-clt-sysfs.c` file for instances of `kobj`. That's likely where the kobject for my clt_path would get initialized. This should quickly pinpoint the exact location.
|
| 23/2 |
2026/09/04 00:58 |
tool |
grepper |
0m
Args: map[Expression:kobject_init_and_add.*clt_path->kobj]
Results: map[Output:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c=425=int rtrs_clt_create_path_files(struct rtrs_clt_path *clt_path)
--
drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c-435- rtrs_addr_to_str(&path, str, sizeof(str));
drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c:436: err = kobject_init_and_add(&clt_path->kobj, &ktype_sess,
drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c-437- clt->kobj_paths,
]
|
| 24/2 |
2026/09/04 00:58 |
llm |
expert |
0m
Model:
Tokens:
input: 31462
output: 29
thoughts: 42
Thoughts: Okay, here's my attempt at summarizing those thoughts from an expert's perspective, using the first person and aiming for that "fulsome summary" feel:
**Delving into `rtrs_clt_create_path_files` and its Initialization**
Alright, let's break this down. My initial thought is focused on the core function, `rtrs_clt_create_path_files`, and what's happening within it. Specifically, I'm noting that it's responsible for initializing `clt_path->kobj`. This is the crux of the matter: establishing that kernel object. Now, the key question becomes, *when* exactly does this crucial function, `rtrs_clt_create_path_files`, get called in the grand scheme of things? I need to understand its trigger mechanism, its place within the broader system's initialization sequence, or perhaps its response to some external event. Is this part of a driver probe? A configuration process? Is it called lazily, on-demand? Knowing the call chain and the context of that call is essential for troubleshooting, understanding resource allocation, or even optimizing this part of the code. That "when" is the key to understanding the what and how.
|
| 25/2 |
2026/09/04 00:58 |
tool |
codesearch-find-references |
0m
Args: map[Name:rtrs_clt_create_path_files]
Results: map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_create_path_from_sysfs SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:3151] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_open SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2864]] TruncatedOutput:false]
|
| 26/2 |
2026/09/04 00:58 |
llm |
expert |
0m
Model:
Tokens:
input: 31950
output: 48
thoughts: 35
Thoughts: Here's my summary, as if I were thinking these thoughts:
**Examining the rtrs_clt_open Function**
Alright, let's dive into this. I need to refresh my memory on how this client-side RTR (Reliable Transport Request Sequence) setup works. Specifically, I'm going to take a look at the `rtrs_clt_open` function. It's in `drivers/infiniband/ulp/rtrs/rtrs-clt.c`, which makes sense. That's the likely spot to find the initialization routine for the client-side of this reliable transport protocol. I need to understand exactly what happens during the "open" process. Is it allocating resources, registering things with the hardware, setting up data structures... I'm looking for the key steps in setting up the client side. Knowing how that handshake is established is going to be crucial for the issue I'm looking into. Let's see what's what.
|
| 27/2 |
2026/09/04 00:58 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/ulp/rtrs/rtrs-clt.c FirstLine:2840 LineCount:50]
Results: map[Contents:2840: goto out;
2841: }
2842: for (i = 0; i < paths_num; i++) {
2843: struct rtrs_clt_path *clt_path;
2844:
2845: clt_path = alloc_path(clt, &paths[i], nr_cpu_ids,
2846: nr_poll_queues);
2847: if (IS_ERR(clt_path)) {
2848: err = PTR_ERR(clt_path);
2849: goto close_all_path;
2850: }
2851: if (!i)
2852: clt_path->for_new_clt = 1;
2853: list_add_tail_rcu(&clt_path->s.entry, &clt->paths_list);
2854:
2855: err = init_path(clt_path);
2856: if (err) {
2857: list_del_rcu(&clt_path->s.entry);
2858: rtrs_clt_close_conns(clt_path, true);
2859: free_percpu(clt_path->stats->pcpu_stats);
2860: free_path(clt_path);
2861: goto close_all_path;
2862: }
2863:
2864: err = rtrs_clt_create_path_files(clt_path);
2865: if (err) {
2866: list_del_rcu(&clt_path->s.entry);
2867: rtrs_clt_close_conns(clt_path, true);
2868: free_percpu(clt_path->stats->pcpu_stats);
2869: free_path(clt_path);
2870: goto close_all_path;
2871: }
2872: }
2873: err = alloc_permits(clt);
2874: if (err)
2875: goto close_all_path;
2876:
2877: return clt;
2878:
2879: close_all_path:
2880: list_for_each_entry_safe(clt_path, tmp, &clt->paths_list, s.entry) {
2881: rtrs_clt_destroy_path_files(clt_path, NULL);
2882: rtrs_clt_close_conns(clt_path, true);
2883: kobject_put(&clt_path->kobj);
2884: }
2885: rtrs_clt_destroy_sysfs_root(clt);
2886: free_clt(clt);
2887:
2888: out:
2889: return ERR_PTR(err);
]
|
| 28/2 |
2026/09/04 00:58 |
llm |
expert |
0m
Model:
Tokens:
input: 33069
output: 48
thoughts: 33
Thoughts: Here's my take on the thought process:
**Initial Assessment: Control Flow and Dependencies**
Okay, hold on a second. I need to make sure I'm following the execution flow correctly. It looks like `init_path` is being called *before* `rtrs_clt_create_path_files`. That seems significant. Before I move on with this analysis, I need to understand what's happening within `init_path`. I should probably double-check that this ordering is intended, and there aren't any sneaky interactions I'm overlooking. Let's dive into `init_path` and see what it does.
|
| 29/2 |
2026/09/04 00:58 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/ulp/rtrs/rtrs-clt.c FirstLine:2620 LineCount:50]
Results: map[Contents:2620: * init_path() - establishes all path connections and does handshake
2621: * @clt_path: client path.
2622: * In case of error full close or reconnect procedure should be taken,
2623: * because reconnect or close async works can be started.
2624: */
2625: static int init_path(struct rtrs_clt_path *clt_path)
2626: {
2627: int err;
2628: char str[NAME_MAX];
2629: struct rtrs_addr path = {
2630: .src = &clt_path->s.src_addr,
2631: .dst = &clt_path->s.dst_addr,
2632: };
2633:
2634: rtrs_addr_to_str(&path, str, sizeof(str));
2635:
2636: mutex_lock(&clt_path->init_mutex);
2637: err = init_conns(clt_path);
2638: if (err) {
2639: rtrs_err(clt_path->clt,
2640: "init_conns() failed: err=%pe path=%s [%s:%u]\n",
2641: ERR_PTR(err), str, clt_path->hca_name, clt_path->hca_port);
2642: goto out;
2643: }
2644: err = rtrs_send_path_info(clt_path);
2645: if (err) {
2646: rtrs_err(clt_path->clt,
2647: "rtrs_send_path_info() failed: err=%pe path=%s [%s:%u]\n",
2648: ERR_PTR(err), str, clt_path->hca_name, clt_path->hca_port);
2649: goto out;
2650: }
2651: rtrs_clt_path_up(clt_path);
2652: rtrs_start_hb(&clt_path->s);
2653: out:
2654: mutex_unlock(&clt_path->init_mutex);
2655:
2656: return err;
2657: }
2658:
2659: static void rtrs_clt_reconnect_work(struct work_struct *work)
2660: {
2661: struct rtrs_clt_path *clt_path;
2662: struct rtrs_clt_sess *clt;
2663: int err;
2664:
2665: clt_path = container_of(to_delayed_work(work), struct rtrs_clt_path,
2666: reconnect_dwork);
2667: clt = clt_path->clt;
2668:
2669: trace_rtrs_clt_reconnect_work(clt_path);
]
|
| 30/2 |
2026/09/04 00:58 |
llm |
expert |
0m
Model:
Tokens:
input: 34132
output: 48
thoughts: 58
Thoughts: **My Initial Thoughts on the Initialization Process**
Okay, so `init_path` is the entry point, and it immediately calls `init_conns` with `clt_path`. That's standard practice, a good separation of concerns. The critical point is, if `init_conns` bombs out, the entire initialization sequence fails, and it returns an error. That makes sense, connection establishment is fundamental. Now, I need to focus on how `init_conns` is handling the connection establishment itself. I should probably dive right into examining the logic of `init_conns` and ensure there's proper error handling and resource management within that function.
|
| 31/2 |
2026/09/04 00:58 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/ulp/rtrs/rtrs-clt.c FirstLine:2340 LineCount:50]
Results: map[Contents:2340:
2341: cancel_work_sync(&clt_path->err_recovery_work);
2342: cancel_delayed_work_sync(&clt_path->reconnect_dwork);
2343: rtrs_clt_stop_and_destroy_conns(clt_path);
2344: rtrs_clt_change_state_get_old(clt_path, RTRS_CLT_CLOSED, NULL);
2345: }
2346:
2347: static int init_conns(struct rtrs_clt_path *clt_path)
2348: {
2349: unsigned int cid;
2350: int err, i;
2351:
2352: /*
2353: * On every new session connections increase reconnect counter
2354: * to avoid clashes with previous sessions not yet closed
2355: * sessions on a server side.
2356: */
2357: clt_path->s.recon_cnt++;
2358:
2359: /* Establish all RDMA connections */
2360: for (cid = 0; cid < clt_path->s.con_num; cid++) {
2361: err = create_con(clt_path, cid);
2362: if (err)
2363: goto destroy;
2364:
2365: err = create_cm(to_clt_con(clt_path->s.con[cid]));
2366: if (err)
2367: goto destroy;
2368: }
2369:
2370: /*
2371: * Set the cid to con_num - 1, since if we fail later, we want to stay in bounds.
2372: */
2373: cid = clt_path->s.con_num - 1;
2374:
2375: err = alloc_path_reqs(clt_path);
2376: if (err)
2377: goto destroy;
2378:
2379: return 0;
2380:
2381: destroy:
2382: /* Make sure we do the cleanup in the order they are created */
2383: for (i = 0; i <= cid; i++) {
2384: struct rtrs_clt_con *con;
2385:
2386: if (!clt_path->s.con[i])
2387: break;
2388:
2389: con = to_clt_con(clt_path->s.con[i]);
]
|
| 32/2 |
2026/09/04 00:58 |
llm |
expert |
0m
Model:
Tokens:
input: 35125
output: 25
thoughts: 588
Thoughts: **My Analysis of a Potential NULL Pointer Dereference**
Okay, so here's what I've pieced together. The `create_cm` function, called during connection initialization (`init_conns`), uses RDMA CM primitives: `rdma_create_id` and `rdma_resolve_addr`. The issue lies within the asynchronous nature of `rdma_resolve_addr`. This triggers RDMA CM events, and if an error happens (like an `RDMA_CM_EVENT_ADDR_ERROR`), the CM event handler, `rtrs_clt_rdma_cm_handler`, gets called. This handler, in turn, calls `rtrs_rdma_error_recovery`.
Now, here's where it gets interesting. `rtrs_rdma_error_recovery` uses a tracepoint, `trace_rtrs_rdma_error_recovery(clt_path)`, which accesses `kobject_name(&clt_path->kobj)`. The problem is that `clt_path->kobj` is initialized in `rtrs_clt_create_path_files`, which is called *after* `init_path` and thus `init_conns` returns! This implies that at the time the tracepoint is triggered, `kobj` is not yet properly initialized.
Specifically, `kobject_name` returns `kobj->name`. If `kobj` isn't initialized, then `kobj->name` will be NULL. Consequently, the subsequent `memcpy(__entry->sessname, kobject_name(&clt_path->kobj), NAME_MAX)` call is a classic NULL pointer dereference β because it's reading from address `0x0`.
So, the tracepoint is triggered asynchronously by a workqueue or CM event handler, before `kobject` has been initialized, causing a read from `NULL` via `memcpy`. This will result in a kernel oops with a message like `"Unable to handle kernel NULL pointer dereference at virtual address 00000000 when read"`. It's a read from a NULL pointer, plain and simple.
Now, from an exploitation standpoint: this is a kernel oops due to a read from a NULL pointer in the worker or CM thread. Normally, this would result in that thread dying or the system panicking (if `panic_on_oops` is set) but it would not lead to privilege escalation or memory corruption. It's essentially a denial-of-service vulnerability, where a worker thread or the CM thread crashes.
The key question is whether this is user-triggerable. The RDMA CM event is caused by RDMA connection establishment. I need to find out how `rtrs_clt_open` is called to understand the attack surface. Further investigation is needed to determine the exact call path to `rtrs_clt_open`.
|
| 33/2 |
2026/09/04 00:59 |
tool |
codesearch-find-references |
0m
Args:
Results: map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:find_and_get_or_create_sess SourceFile:drivers/block/rnbd/rnbd-clt.c SourceLine:1268] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__UNIQUE_ID_addressable_rtrs_clt_open_879 SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2891] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__gendwarfksyms_ptr_rtrs_clt_open SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2891] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__gendwarfksyms_ptr_rtrs_clt_open SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2891]] TruncatedOutput:false]
|
| 34/2 |
2026/09/04 00:59 |
llm |
expert |
0m
Model:
Tokens:
input: 36682
output: 29
thoughts: 66
Thoughts: Here's my summary, as though I'm thinking through this process:
**Tracing the rtrs_clt_open Call**
Okay, so `rtrs_clt_open` is the function we're interested in, and the code says it's called by `find_and_get_or_create_sess`. Makes sense; `rtrs_clt_open` sounds like it's opening a client connection, and `find_and_get_or_create_sess` suggests it's managing sessions. Seems logical, given the context within `drivers/block/rnbd/rnbd-clt.c`.
Now, I need to understand the *why* of this call. I'll need to go deeper to understand where `find_and_get_or_create_sess` itself is called. Knowing its callers will shed more light on the overall flow, specifically how the client connections are established and managed within the RNBD block driver. Let's trace back from `find_and_get_or_create_sess` and see what triggers it. Understanding the call chain is key.
|
| 35/2 |
2026/09/04 00:59 |
tool |
codesearch-find-references |
0m
Args: map[Name:find_and_get_or_create_sess]
Results: map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:rnbd_clt_map_device SourceFile:drivers/block/rnbd/rnbd-clt.c SourceLine:1551]] TruncatedOutput:false]
|
| 36/2 |
2026/09/04 00:59 |
llm |
expert |
0m
Model:
Tokens:
input: 37105
output: 28
thoughts: 17
Thoughts: Here's my thought process, as if I were considering this question:
**Thinking Through `rnbd_clt_map_device`**
Okay, so `rnbd_clt_map_device`... that's a function name I recognize from the realm of the Reliable Network Block Device (rnbd) client, likely within the kernel. The immediate question is always, "Where's this called from?" What part of the client code invokes this particular mapping function? It's a fundamental question of control flow and how the rnbd client interacts with the block device layer. I need to trace its call sites to understand the circumstances under which the client attempts to map an rbd device. Is it triggered during device setup, or maybe during I/O operations, or perhaps some kind of error recovery? Knowing the caller gives context to the mapping. Is it only called once per device, or multiple times? Does the caller specify any device parameters?
|
| 37/2 |
2026/09/04 00:59 |
tool |
codesearch-find-references |
0m
Args: map[Name:rnbd_clt_map_device]
Results: map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:rnbd_clt_map_device_store SourceFile:drivers/block/rnbd/rnbd-clt-sysfs.c SourceLine:612]] TruncatedOutput:false]
|
| 38/2 |
2026/09/04 00:59 |
llm |
expert |
0m
Model:
Tokens:
input: 37440
output: 47
thoughts: 62
Thoughts: **Diving into the `rnbd_clt_map_device_store` Function**
Okay, so I'm looking at `rnbd_clt_map_device_store`, which, if I remember correctly, is a sysfs store function. I need to refresh my memory on the specifics of its implementation. Let's head over to the source code, specifically `drivers/block/rnbd/rnbd-clt-sysfs.c`. I need to understand what this store function does within the RNBD client context. This is likely where the magic happens for some device mapping operation, so I need to understand how devices are mapped and configured, what kind of input it's expecting, and how it's interacting with other RNBD client components. Time to dig in and get a good picture of this specific interaction point.
|
| 39/2 |
2026/09/04 00:59 |
tool |
read-file |
0m
Args: map[File:drivers/block/rnbd/rnbd-clt-sysfs.c FirstLine:600 LineCount:50]
Results: map[Contents: 600: paths[path_cnt].dst = &addrs[path_cnt * 2 + 1];
601: }
602:
603: ret = rnbd_clt_parse_map_options(buf, ARRAY_SIZE(paths), &opt);
604: if (ret)
605: goto out;
606:
607: pr_info("Mapping device %s on session %s, (access_mode: %s, nr_poll_queues: %d)\n",
608: pathname, sessname,
609: rnbd_access_modes[access_mode].str,
610: nr_poll_queues);
611:
612: dev = rnbd_clt_map_device(sessname, paths, path_cnt, port_nr, pathname,
613: access_mode, nr_poll_queues);
614: if (IS_ERR(dev)) {
615: ret = PTR_ERR(dev);
616: goto out;
617: }
618:
619: ret = rnbd_clt_add_dev_kobj(dev);
620: if (ret)
621: goto unmap_dev;
622:
623: ret = rnbd_clt_add_dev_symlink(dev);
624: if (ret)
625: goto unmap_dev;
626:
627: kfree(addrs);
628: return count;
629:
630: unmap_dev:
631: rnbd_clt_unmap_device(dev, true, NULL);
632: out:
633: kfree(addrs);
634: return ret;
635: }
636:
637: static struct kobj_attribute rnbd_clt_map_device_attr =
638: __ATTR(map_device, 0644,
639: rnbd_clt_map_device_show, rnbd_clt_map_device_store);
640:
641: static struct attribute *default_attrs[] = {
642: &rnbd_clt_map_device_attr.attr,
643: NULL,
644: };
645:
646: static struct attribute_group default_attr_group = {
647: .attrs = default_attrs,
648: };
649:
]
|
| 40/2 |
2026/09/04 00:59 |
llm |
expert |
0m
Model:
Tokens:
input: 38472
output: 25
thoughts: 78
Thoughts: Okay, here's my take on those thoughts, framed as my own internal analysis:
**Analyzing the `map_device` Sysfs Attribute**
Alright, let's break this down. That `map_device` attribute in sysfs...it's been set up with mode `0644`. Hmm, right. *0644*... so that means root has write access and everyone else is limited to read-only. That's a key observation. It tells me immediately that only the root user can trigger whatever vulnerability, or potentially unexpected behavior, this thing's tied to. Makes sense; that drastically limits the attack surface, in most situations. Now that I understand the permissions, I should check whether there is any other way to open `rtrs_clt_open`. It is important to cover all the attack vectors.
|
| 41/2 |
2026/09/04 00:59 |
tool |
codesearch-find-references |
0m
Args:
Results: map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:find_and_get_or_create_sess SourceFile:drivers/block/rnbd/rnbd-clt.c SourceLine:1268] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__UNIQUE_ID_addressable_rtrs_clt_open_879 SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2891] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__gendwarfksyms_ptr_rtrs_clt_open SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2891] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__gendwarfksyms_ptr_rtrs_clt_open SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt.c SourceLine:2891]] TruncatedOutput:false]
|
| 42/2 |
2026/09/04 00:59 |
llm |
expert |
0m
Model:
Tokens:
input: 39079
output: 29
thoughts: 38
Thoughts: Okay, here's my take on those thoughts, framed as an expert's internal monologue:
**Investigating the `find_and_get_or_create_sess` Function's Usage**
Alright, let's see, the code's telling me that `find_and_get_or_create_sess` is *only* called by one specific function, the one indicated by the prompt. That's interesting, and it does make the code easier to follow, but it also raises a flag for a quick sanity check. I need to make sure I haven't missed any other calls, either direct or indirect, even ones in tests, that might utilize this function. This is a crucial step in understanding the function's broader implications and whether this is by design, or a potential point for refactoring. I'll need to run a quick search and confirm that the call graph I'm seeing is complete. No assumptions, I need solid verification. A second look never hurts when you're dealing with critical functions.
|
| 43/2 |
2026/09/04 00:59 |
tool |
codesearch-find-references |
0m
Args: map[Name:find_and_get_or_create_sess]
Results: map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:rnbd_clt_map_device SourceFile:drivers/block/rnbd/rnbd-clt.c SourceLine:1551]] TruncatedOutput:false]
|
| 44/2 |
2026/09/04 00:59 |
llm |
expert |
0m
Model:
Tokens:
input: 39448
output: 30
thoughts: 155
Thoughts: **Analyzing the Bug's Root**
Okay, so the investigation points directly at `rnbd_clt_map_device`. That's the function causing the trouble. The code's saying the call to this function *only* happens through `rnbd_clt_map_device_store`. This narrows it down significantly. It means the bug can *only* be triggered by writing something to the `/sys/class/rnbd-client/map_device` sysfs entry, or a path like it. The permissions, `0644`, are immediately relevant - it's read-write for root, read-only for everyone else.
The next question, a critical one, is: can this sysfs path be written to from within a user namespace? Generally, sysfs is a no-go for user namespaces in terms of writing, unless the specific subsystem *explicitly* allows it, like networking devices within a network namespace. We need to confirm whether `rnbd_clt_map_device_attr` is even added under the control of a user that doesn't have the appropriate capabilities. Gotta check where that's added to determine if the path is accessible. This is where the root of the issue will be.
|
| 45/2 |
2026/09/04 00:59 |
tool |
codesearch-find-references |
0m
Args: map[Name:rnbd_clt_map_device_attr]
Results: map[References:<nil> TruncatedOutput:false]
|
| 46/2 |
2026/09/04 00:59 |
llm |
expert |
0m
Model:
Tokens:
input: 39917
output: 26
thoughts: 28
Thoughts: Okay, here's my interpretation of those thoughts, tailored for an expert audience, presented in the first person:
**Navigating the Labyrinth of Configuration**
Alright, I'm digging into this configuration issue, and I'm hitting a mental wall. The immediate path isn't clicking. Instead of just forging ahead, I need to take a step back and think systematically. My gut tells me there's an attribute group or a specific mapping function at play here, likely related to default parameters or device handling. Therefore, I need to shift gears and search explicitly. I need to look for either `default_attr_group` - because this could dictate the initial parameters, or `rnbd_clt_map_device_attr`, as this sounds like the function responsible for mapping device attributes. Searching for these will almost certainly reveal the critical connection point. I'm going to focus my queries on those terms specifically.
|
| 47/2 |
2026/09/04 00:59 |
tool |
grepper |
0m
Args: map[Expression:rnbd_clt_map_device_attr]
Results: map[Output:drivers/block/rnbd/rnbd-clt-sysfs.c=570=static ssize_t rnbd_clt_map_device_store(struct kobject *kobj,
--
drivers/block/rnbd/rnbd-clt-sysfs.c-636-
drivers/block/rnbd/rnbd-clt-sysfs.c:637:static struct kobj_attribute rnbd_clt_map_device_attr =
drivers/block/rnbd/rnbd-clt-sysfs.c-638- __ATTR(map_device, 0644,
--
drivers/block/rnbd/rnbd-clt-sysfs.c=641=static struct attribute *default_attrs[] = {
drivers/block/rnbd/rnbd-clt-sysfs.c:642: &rnbd_clt_map_device_attr.attr,
drivers/block/rnbd/rnbd-clt-sysfs.c-643- NULL,
]
|
| 48/2 |
2026/09/04 00:59 |
llm |
expert |
0m
Model:
Tokens:
input: 40440
output: 19
thoughts: 15
Thoughts: Here's my take on those thoughts:
**Tracing the Usage of `default_attr_group`**
Okay, so I need to figure out the scope of this `default_attr_group` variable or function. My first step is going to be to pinpoint exactly where it's being used within the codebase. I need to understand its context. Knowing where it's *used* will tell me everything I need to know about its function and the things that depend on it. That's the best way to understand its purpose and how changes will ripple. Let's dig in.
|
| 49/2 |
2026/09/04 00:59 |
tool |
grepper |
0m
Args: map[Expression:default_attr_group]
Results: map[Output:drivers/block/rnbd/rnbd-clt-sysfs.c=641=static struct attribute *default_attrs[] = {
--
drivers/block/rnbd/rnbd-clt-sysfs.c-645-
drivers/block/rnbd/rnbd-clt-sysfs.c:646:static struct attribute_group default_attr_group = {
drivers/block/rnbd/rnbd-clt-sysfs.c-647- .attrs = default_attrs,
--
drivers/block/rnbd/rnbd-clt-sysfs.c-649-
drivers/block/rnbd/rnbd-clt-sysfs.c:650:static const struct attribute_group *default_attr_groups[] = {
drivers/block/rnbd/rnbd-clt-sysfs.c:651: &default_attr_group,
drivers/block/rnbd/rnbd-clt-sysfs.c-652- NULL,
--
drivers/block/rnbd/rnbd-clt-sysfs.c=655=int rnbd_clt_create_sysfs_files(void)
--
drivers/block/rnbd/rnbd-clt-sysfs.c-664- MKDEV(0, 0), NULL,
drivers/block/rnbd/rnbd-clt-sysfs.c:665: default_attr_groups, "ctl");
drivers/block/rnbd/rnbd-clt-sysfs.c-666- if (IS_ERR(rnbd_dev)) {
--
drivers/block/rnbd/rnbd-clt-sysfs.c=686=void rnbd_clt_destroy_sysfs_files(void)
drivers/block/rnbd/rnbd-clt-sysfs.c-687-{
drivers/block/rnbd/rnbd-clt-sysfs.c:688: sysfs_remove_group(&rnbd_dev->kobj, &default_attr_group);
drivers/block/rnbd/rnbd-clt-sysfs.c-689- kobject_del(rnbd_devs_kobj);
]
|
| 50/2 |
2026/09/04 00:59 |
llm |
expert |
0m
Model:
Tokens:
input: 41185
output: 48
thoughts: 683
Thoughts: **Analyzing the Potential Impact of a NULL Pointer Dereference in the RDMA Client**
Okay, so I'm looking at this vulnerability in the RDMA client, specifically the handling of the `/sys/class/rnbd-client/ctl` device attribute. My initial thought is, because this is sysfs and not namespaced, root owns it in the initial user namespace. That means, an unprivileged user can't write to it, even in their own user namespace, since sysfs is mounted read-only or the specific file is root-owned globally. So, it's not exploitable by unprivileged processes or within user namespaces, good.
Now, is this thing actually exploitable? Itβs a NULL pointer dereference on read, triggered by `memcpy(__entry->sessname, kobject_name(&clt_path->kobj), NAME_MAX);` where `kobject_name` returns `NULL`. The `memcpy` attempts to read from this `NULL` pointer and that causes a kernel oops. In a production kernel, that usually kills a thread, likely a worker thread or CM thread. No memory corruption or privilege escalation, which is a relief. It's strictly a denial of service, potentially hanging the subsystem by killing a kernel thread.
Wait, could this be triggered remotely? Let's see. The bug is in `rtrs_clt_rdma_cm_handler`, and handles RDMA CM events. So a remote server rejecting or erroring during a connection attempt would trigger this error event. Crucially, the client *initiates* the connection by writing to that sysfs file. So a remote server can trigger this if the client is currently trying to connect to it. But, and hereβs the rub, the client has to be *trying* to connect. Can a remote attacker force the client to connect? No, it requires local root to write to sysfs. So it's remote trigger if the client is configured to connect to a malicious server, and the remote server sends a reject or error. It's a remote trigger, but the primary trigger remains local root writing to sysfs.
Alright, let's make sure there aren't other ways `rtrs_clt_open` is called. No, we checked that.
Wait, let's double-check if `rtrs_clt_reconnect_work` could trigger this. That's a delayed work call that initiates a connection. It calls `init_path`. If `init_path` fails, an error is returned. However, `rtrs_clt_reconnect_work` gets called when the connection drops and tries to reconnect. But when it reconnects `clt_path->kobj` is initialized. Right, because `clt_path->kobj` is initialized in `rtrs_clt_open` *after* the first `init_path` succeeds. Hang on, what if the first `init_path` fails? If it fails in `rtrs_clt_open`, `rtrs_clt_open` cleans up and returns an error. Let's look at `rtrs_clt_open` again. Gotta make sure I'm not missing anything.
|
| 51/2 |
2026/09/04 00:59 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/ulp/rtrs/rtrs-clt.c FirstLine:2840 LineCount:50]
Results: map[Contents:2840: goto out;
2841: }
2842: for (i = 0; i < paths_num; i++) {
2843: struct rtrs_clt_path *clt_path;
2844:
2845: clt_path = alloc_path(clt, &paths[i], nr_cpu_ids,
2846: nr_poll_queues);
2847: if (IS_ERR(clt_path)) {
2848: err = PTR_ERR(clt_path);
2849: goto close_all_path;
2850: }
2851: if (!i)
2852: clt_path->for_new_clt = 1;
2853: list_add_tail_rcu(&clt_path->s.entry, &clt->paths_list);
2854:
2855: err = init_path(clt_path);
2856: if (err) {
2857: list_del_rcu(&clt_path->s.entry);
2858: rtrs_clt_close_conns(clt_path, true);
2859: free_percpu(clt_path->stats->pcpu_stats);
2860: free_path(clt_path);
2861: goto close_all_path;
2862: }
2863:
2864: err = rtrs_clt_create_path_files(clt_path);
2865: if (err) {
2866: list_del_rcu(&clt_path->s.entry);
2867: rtrs_clt_close_conns(clt_path, true);
2868: free_percpu(clt_path->stats->pcpu_stats);
2869: free_path(clt_path);
2870: goto close_all_path;
2871: }
2872: }
2873: err = alloc_permits(clt);
2874: if (err)
2875: goto close_all_path;
2876:
2877: return clt;
2878:
2879: close_all_path:
2880: list_for_each_entry_safe(clt_path, tmp, &clt->paths_list, s.entry) {
2881: rtrs_clt_destroy_path_files(clt_path, NULL);
2882: rtrs_clt_close_conns(clt_path, true);
2883: kobject_put(&clt_path->kobj);
2884: }
2885: rtrs_clt_destroy_sysfs_root(clt);
2886: free_clt(clt);
2887:
2888: out:
2889: return ERR_PTR(err);
]
|
| 52/2 |
2026/09/04 00:59 |
llm |
expert |
0m
Model:
Tokens:
input: 43430
output: 48
thoughts: 131
Thoughts: **My RDMA Connection Setup**
Okay, so I'm looking at `rtrs_clt_open`. The first thing that jumps out is the call to `init_path`. Within `init_path`, we have the call to `init_conns`, which makes sense. From `init_conns`, the code calls `create_cm`. Now, `create_cm` is where the RDMA connection is actually initiated, which is good, but it's important to remember this is happening asynchronously. I need to keep that in mind. I recall that `rdma_resolve_addr` returns 0 if it *successfully started* the address resolution.
So, the key here is that the setup begins asynchronously. Then, I see that `init_path` continues, and it looks like it proceeds to send path information. Hold onβ¦is it really sending data *right now* with `rtrs_send_path_info`, or is that function waiting until the connection is fully established before sending it? I should probably double-check the logic in `init_path` just to be certain. Gotta be precise here.
|
| 53/2 |
2026/09/04 01:00 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/ulp/rtrs/rtrs-clt.c FirstLine:2625 LineCount:50]
Results: map[Contents:2625: static int init_path(struct rtrs_clt_path *clt_path)
2626: {
2627: int err;
2628: char str[NAME_MAX];
2629: struct rtrs_addr path = {
2630: .src = &clt_path->s.src_addr,
2631: .dst = &clt_path->s.dst_addr,
2632: };
2633:
2634: rtrs_addr_to_str(&path, str, sizeof(str));
2635:
2636: mutex_lock(&clt_path->init_mutex);
2637: err = init_conns(clt_path);
2638: if (err) {
2639: rtrs_err(clt_path->clt,
2640: "init_conns() failed: err=%pe path=%s [%s:%u]\n",
2641: ERR_PTR(err), str, clt_path->hca_name, clt_path->hca_port);
2642: goto out;
2643: }
2644: err = rtrs_send_path_info(clt_path);
2645: if (err) {
2646: rtrs_err(clt_path->clt,
2647: "rtrs_send_path_info() failed: err=%pe path=%s [%s:%u]\n",
2648: ERR_PTR(err), str, clt_path->hca_name, clt_path->hca_port);
2649: goto out;
2650: }
2651: rtrs_clt_path_up(clt_path);
2652: rtrs_start_hb(&clt_path->s);
2653: out:
2654: mutex_unlock(&clt_path->init_mutex);
2655:
2656: return err;
2657: }
2658:
2659: static void rtrs_clt_reconnect_work(struct work_struct *work)
2660: {
2661: struct rtrs_clt_path *clt_path;
2662: struct rtrs_clt_sess *clt;
2663: int err;
2664:
2665: clt_path = container_of(to_delayed_work(work), struct rtrs_clt_path,
2666: reconnect_dwork);
2667: clt = clt_path->clt;
2668:
2669: trace_rtrs_clt_reconnect_work(clt_path);
2670:
2671: if (READ_ONCE(clt_path->state) != RTRS_CLT_RECONNECTING)
2672: return;
2673:
2674: if (clt_path->reconnect_attempts >= clt->max_reconnect_attempts) {
]
|
| 54/2 |
2026/09/04 01:00 |
llm |
expert |
0m
Model:
Tokens:
input: 44696
output: 48
thoughts: 15
Thoughts: Okay, let's dive into this. Here's my take on those thoughts, as if they're my own:
**Analyzing `rtrs_send_path_info`**
Alright, let's get down to brass tacks. I'm focusing on `rtrs_send_path_info`. This function... what's its purpose again? Is it handling the initial handshake with the RTRR client? Or is it more involved, managing the data transfer itself, perhaps chunking it or ensuring path information is correctly formatted for transmission? My immediate questions are centered around its scope. Does it handle security considerations? Error handling? Retry mechanisms? I need to understand the boundaries of its responsibility within the RTRR protocol's flow. Where does it fit into the bigger picture? Is it the core of path information delivery or just a cog in the machine? Let's break it down piece by piece.
|
| 55/2 |
2026/09/04 01:00 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/ulp/rtrs/rtrs-clt.c FirstLine:2540 LineCount:50]
Results: map[Contents:2540: goto out;
2541:
2542: state = RTRS_CLT_CONNECTED;
2543:
2544: out:
2545: rtrs_clt_update_wc_stats(con);
2546: rtrs_iu_free(iu, clt_path->s.dev->ib_dev, 1);
2547: rtrs_clt_change_state_get_old(clt_path, state, NULL);
2548: }
2549:
2550: static int rtrs_send_path_info(struct rtrs_clt_path *clt_path)
2551: {
2552: struct rtrs_clt_con *usr_con = to_clt_con(clt_path->s.con[0]);
2553: struct rtrs_msg_info_req *msg;
2554: struct rtrs_iu *tx_iu, *rx_iu;
2555: size_t rx_sz;
2556: int err;
2557:
2558: rx_sz = sizeof(struct rtrs_msg_info_rsp);
2559: rx_sz += sizeof(struct rtrs_sg_desc) * clt_path->queue_depth;
2560:
2561: tx_iu = rtrs_iu_alloc(1, sizeof(struct rtrs_msg_info_req), GFP_KERNEL,
2562: clt_path->s.dev->ib_dev, DMA_TO_DEVICE,
2563: rtrs_clt_info_req_done);
2564: rx_iu = rtrs_iu_alloc(1, rx_sz, GFP_KERNEL, clt_path->s.dev->ib_dev,
2565: DMA_FROM_DEVICE, rtrs_clt_info_rsp_done);
2566: if (!tx_iu || !rx_iu) {
2567: err = -ENOMEM;
2568: goto out;
2569: }
2570: /* Prepare for getting info response */
2571: err = rtrs_iu_post_recv(&usr_con->c, rx_iu);
2572: if (err) {
2573: rtrs_err(clt_path->clt, "rtrs_iu_post_recv(), err: %pe\n", ERR_PTR(err));
2574: goto out;
2575: }
2576: rx_iu = NULL;
2577:
2578: msg = tx_iu->buf;
2579: msg->type = cpu_to_le16(RTRS_MSG_INFO_REQ);
2580: memcpy(msg->pathname, clt_path->s.sessname, sizeof(msg->pathname));
2581:
2582: ib_dma_sync_single_for_device(clt_path->s.dev->ib_dev,
2583: tx_iu->dma_addr,
2584: tx_iu->size, DMA_TO_DEVICE);
2585:
2586: /* Send info request */
2587: err = rtrs_iu_post_send(&usr_con->c, tx_iu, sizeof(*msg), NULL);
2588: if (err) {
2589: rtrs_err(clt_path->clt, "rtrs_iu_post_send(), err: %pe\n", ERR_PTR(err));
]
|
| 56/2 |
2026/09/04 01:00 |
llm |
expert |
0m
Model:
Tokens:
input: 45916
output: 48
thoughts: 57
Thoughts: Okay, let me think this through.
**Analyzing the Connection and Send Request Sequence**
Hmm, so `rtrs_send_path_info` is responsible for actually *sending* a request, which means it likely involves a POST operation. That makes sense. But... hold on. A POST operation assumes a pre-existing connection, right? You can't just send something without having the communication channel established first. That's a fundamental principle of how these things work.
So, the critical question is *where* in the code are we waiting for that all-important connection to come online? Where's the handshake happening? The logical place to start is the `init_conns` function, since that name implies it's involved in connection initialization. I need to go back and double-check exactly what's happening within that section of the code to understand how this send mechanism interacts with the connection process. I'm sure the answer is in there somewhere; I just need to refresh my memory on the specifics.
|
| 57/2 |
2026/09/04 01:00 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/ulp/rtrs/rtrs-clt.c FirstLine:2350 LineCount:50]
Results: map[Contents:2350: int err, i;
2351:
2352: /*
2353: * On every new session connections increase reconnect counter
2354: * to avoid clashes with previous sessions not yet closed
2355: * sessions on a server side.
2356: */
2357: clt_path->s.recon_cnt++;
2358:
2359: /* Establish all RDMA connections */
2360: for (cid = 0; cid < clt_path->s.con_num; cid++) {
2361: err = create_con(clt_path, cid);
2362: if (err)
2363: goto destroy;
2364:
2365: err = create_cm(to_clt_con(clt_path->s.con[cid]));
2366: if (err)
2367: goto destroy;
2368: }
2369:
2370: /*
2371: * Set the cid to con_num - 1, since if we fail later, we want to stay in bounds.
2372: */
2373: cid = clt_path->s.con_num - 1;
2374:
2375: err = alloc_path_reqs(clt_path);
2376: if (err)
2377: goto destroy;
2378:
2379: return 0;
2380:
2381: destroy:
2382: /* Make sure we do the cleanup in the order they are created */
2383: for (i = 0; i <= cid; i++) {
2384: struct rtrs_clt_con *con;
2385:
2386: if (!clt_path->s.con[i])
2387: break;
2388:
2389: con = to_clt_con(clt_path->s.con[i]);
2390: if (con->c.cm_id) {
2391: stop_cm(con);
2392: mutex_lock(&con->con_mutex);
2393: destroy_con_cq_qp(con);
2394: mutex_unlock(&con->con_mutex);
2395: destroy_cm(con);
2396: }
2397: destroy_con(con);
2398: }
2399: /*
]
|
| 58/2 |
2026/09/04 01:00 |
llm |
expert |
0m
Model:
Tokens:
input: 46931
output: 48
thoughts: 43
Thoughts: Okay, let me think this through.
**Analyzing the Connection Manager Initialization**
Wait a second... the `create_cm` function *returns* 0 upon *starting* the connection process. It doesn't mean the connection is *established* immediately. This means `create_cm` is likely asynchronous. But where in the codebase does it actually wait, or does it wait at all, for that connection to be fully set up? We need to dig into `create_cm` to see how it handles the completion of its asynchronous task. I need to understand its internal mechanisms β is there a callback, a separate thread, a polling mechanism, or something else entirely? Time to get into the details of the implementation.
|
| 59/2 |
2026/09/04 01:00 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/ulp/rtrs/rtrs-clt.c FirstLine:2070 LineCount:50]
Results: map[Contents:2070:
2071: /* The caller should do the cleanup in case of error */
2072: static int create_cm(struct rtrs_clt_con *con)
2073: {
2074: struct rtrs_path *s = con->c.path;
2075: struct rtrs_clt_path *clt_path = to_clt_path(s);
2076: struct rdma_cm_id *cm_id;
2077: int err;
2078:
2079: cm_id = rdma_create_id(&init_net, rtrs_clt_rdma_cm_handler, con,
2080: clt_path->s.dst_addr.ss_family == AF_IB ?
2081: RDMA_PS_IB : RDMA_PS_TCP, IB_QPT_RC);
2082: if (IS_ERR(cm_id)) {
2083: rtrs_err(s, "Failed to create CM ID, err: %pe\n", cm_id);
2084: return PTR_ERR(cm_id);
2085: }
2086: con->c.cm_id = cm_id;
2087: con->cm_err = 0;
2088: /* allow the port to be reused */
2089: err = rdma_set_reuseaddr(cm_id, 1);
2090: if (err != 0) {
2091: rtrs_err(s, "Set address reuse failed, err: %pe\n", ERR_PTR(err));
2092: return err;
2093: }
2094: err = rdma_resolve_addr(cm_id, (struct sockaddr *)&clt_path->s.src_addr,
2095: (struct sockaddr *)&clt_path->s.dst_addr,
2096: RTRS_CONNECT_TIMEOUT_MS);
2097: if (err) {
2098: rtrs_err(s, "Failed to resolve address, err: %pe\n", ERR_PTR(err));
2099: return err;
2100: }
2101: /*
2102: * Combine connection status and session events. This is needed
2103: * for waiting two possible cases: cm_err has something meaningful
2104: * or session state was really changed to error by device removal.
2105: */
2106: err = wait_event_interruptible_timeout(
2107: clt_path->state_wq,
2108: con->cm_err || clt_path->state != RTRS_CLT_CONNECTING,
2109: msecs_to_jiffies(RTRS_CONNECT_TIMEOUT_MS));
2110: if (err == 0 || err == -ERESTARTSYS) {
2111: if (err == 0)
2112: err = -ETIMEDOUT;
2113: /* Timedout or interrupted */
2114: return err;
2115: }
2116: if (con->cm_err < 0)
2117: return con->cm_err;
2118: if (READ_ONCE(clt_path->state) != RTRS_CLT_CONNECTING)
2119: /* Device removal */
]
|
| 60/2 |
2026/09/04 01:00 |
llm |
expert |
0m
Model:
Tokens:
input: 48093
output: 31
thoughts: 1409
Thoughts: **Bug Analysis: Uninitialized kobject in RDMA Client Error Handling**
Okay, so here's the breakdown of what I've figured out. `create_cm` uses `wait_event_interruptible_timeout`, which confirms the connection establishment (or failure) is blocking. During this time, `rdma_resolve_addr` is working asynchronously. If something goes wrong during address resolution (e.g., an `RDMA_CM_EVENT_ADDR_ERROR`), the `rtrs_clt_rdma_cm_handler` gets called. This handler sets `cm_err` and calls `rtrs_rdma_error_recovery(con)`. That, in turn, calls a tracepoint, `trace_rtrs_rdma_error_recovery(clt_path)`.
Here's the problem: *that* tracepoint call is where the crash is happening! The `clt_path->kobj` is *uninitialized* at this point. `clt_path->kobj` gets set up in `rtrs_clt_create_path_files`, which is called *after* `init_path` and subsequent calls like `init_conns` and `create_cm` complete successfully. This all means, if `create_cm` fails, `rtrs_clt_create_path_files` never runs. However, the tracepoint gets called *during* the failure handling by `rtrs_clt_rdma_cm_handler`.
So, it boils down to this sequence:
1. `rtrs_clt_open` allocates `clt_path`.
2. `rtrs_clt_open` calls `init_path`.
3. `init_path` calls `init_conns`.
4. `init_conns` calls `create_cm`.
5. `create_cm` calls `rdma_resolve_addr` and waits.
6. An RDMA CM error happens.
7. The RDMA CM thread calls `rtrs_clt_rdma_cm_handler`.
8. `rtrs_clt_rdma_cm_handler` calls `rtrs_rdma_error_recovery`.
9. `rtrs_rdma_error_recovery` calls the tracepoint.
10. The tracepoint accesses `kobject_name(&clt_path->kobj)`.
11. `clt_path->kobj` is uninitialized.
12. This causes a NULL pointer dereference, an oops!
Is it exploitable? It is a NULL pointer dereference on read (`memcpy` reads from NULL). This causes a page fault at address 0. Address 0 is not mapped (mmap\_min\_addr prevents it), so it's a guaranteed kernel oops. It's in a kernel thread, so it kills the thread. Itβs a denial-of-service, because no more RDMA connections can be established, but doesn't lead to memory corruption or privilege escalation. So Exploitable: **False**. Denial Of Service: **True**.
Can a non-privileged user trigger it? No. The trigger is writing to a sysfs file, which requires root permissions. So Unprivileged: **False**. User Namespace: **False**
Can a remote attacker trigger it? If the server rejects the *first* connection attempt, it triggers the bug. During reconnect, `clt_path->kobj` will *already* be initialized. However, the *first* connection attempt needs to fail, where `clt_path` will be destroyed by the kernel.
Yes, a malicious server can trigger this when the client attempts its *first* connection. This requires the *client* to initiate the connection.
Is it a "Remote Trigger?" RDMA CM events come from network packets (reject packets, errors). So, yes, it can be triggered by Ethernet Network traffic. I'm marking Ethernet Network Trigger as **True**, even though it requires the local root user to initiate the first connection attempt. The bug *is* caused by the processing of network data.
|
| 61/2 |
2026/09/04 01:00 |
tool |
codesearch-find-references |
0m
Args: map[Name:rtrs_clt_reconnect_from_sysfs]
Results: map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:rtrs_clt_reconnect_store SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:230]] TruncatedOutput:false]
|
| 62/2 |
2026/09/04 01:00 |
llm |
expert |
0m
Model:
Tokens:
input: 50525
output: 32
thoughts: 63
Thoughts: Okay, here's my interpretation of those thoughts, presented as my own mental process:
**Sysfs Reconnection Considerations**
Alright, so I'm thinking about how the `rtrs_clt_reconnect_from_sysfs` function works. It's triggered from the sysfs, which makes sense. But the interesting part is that when it's called, the `clt_path` that it's working with already has its `kobj` initialized. That's key. It means we're dealing with a pre-existing object, just re-establishing the connection, not a completely new creation.
Now, that immediately makes me consider the alternative: what about `rtrs_clt_create_path_from_sysfs`? When is *that* function used? Does this create scenario ever come in to play? Is the latter called if `rtrs_clt_reconnect_from_sysfs` fails to create a `kobj`, and thus, cannot work on the already present one? I need to understand the distinctions between these two functions better to fully grasp the lifecycle and error handling within the sysfs interaction. This difference in kobj initialization is important, and I need to solidify my understanding of the conditions that determine which function is used.
|
| 63/2 |
2026/09/04 01:00 |
tool |
codesearch-find-references |
0m
Args: map[Name:rtrs_clt_create_path_from_sysfs]
Results: map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:add_path_store SourceFile:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c SourceLine:187]] TruncatedOutput:false]
|
| 64/2 |
2026/09/04 01:00 |
llm |
expert |
0m
Model:
Tokens:
input: 50976
output: 50
thoughts: 14
Thoughts: Here's my understanding of the thought process:
**Sysfs Store Function Deep Dive**
Okay, so I'm focusing on `add_path_store`. Right off the bat, I know this is a specific function β a "store" function β within the sysfs filesystem. That means it's designed to *write* data into the sysfs hierarchy. It's not a read function, it's about modification. I'm going to have to consider what kind of data is being written, how it impacts the system, and how itβs being validated. Understanding the exact context and what this function *stores* is going to be key to evaluating its behavior and potential implications. I need to dig into the surrounding code to determine how it's used and what it's supposed to achieve.
|
| 65/2 |
2026/09/04 01:00 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c FirstLine:170 LineCount:50]
Results: map[Contents: 170: };
171: struct rtrs_clt_sess *clt;
172: const char *nl;
173: size_t len;
174: int err;
175:
176: clt = container_of(dev, struct rtrs_clt_sess, dev);
177:
178: nl = strchr(buf, '\n');
179: if (nl)
180: len = nl - buf;
181: else
182: len = count;
183: err = rtrs_addr_to_sockaddr(buf, len, clt->port, &addr);
184: if (err)
185: return -EINVAL;
186:
187: err = rtrs_clt_create_path_from_sysfs(clt, &addr);
188: if (err)
189: return err;
190:
191: return count;
192: }
193:
194: static DEVICE_ATTR_RW(add_path);
195:
196: static ssize_t rtrs_clt_state_show(struct kobject *kobj,
197: struct kobj_attribute *attr, char *page)
198: {
199: struct rtrs_clt_path *clt_path;
200:
201: clt_path = container_of(kobj, struct rtrs_clt_path, kobj);
202: if (clt_path->state == RTRS_CLT_CONNECTED)
203: return sysfs_emit(page, "connected\n");
204:
205: return sysfs_emit(page, "disconnected\n");
206: }
207:
208: static struct kobj_attribute rtrs_clt_state_attr =
209: __ATTR(state, 0444, rtrs_clt_state_show, NULL);
210:
211: static ssize_t rtrs_clt_reconnect_show(struct kobject *kobj,
212: struct kobj_attribute *attr, char *buf)
213: {
214: return sysfs_emit(buf, "Usage: echo 1 > %s\n", attr->attr.name);
215: }
216:
217: static ssize_t rtrs_clt_reconnect_store(struct kobject *kobj,
218: struct kobj_attribute *attr,
219: const char *buf, size_t count)
]
|
| 66/2 |
2026/09/04 01:00 |
llm |
expert |
0m
Model:
Tokens:
input: 51981
output: 24
thoughts: 906
Thoughts: **My Assessment of the RDMA CM Kernel Oops**
Okay, so here's the breakdown of this RDMA CM kernel bug. It looks like `rtrs_clt_create_path_from_sysfs` shares the same vulnerability as `rtrs_clt_open`. The problem stems from a potential failure in `init_path`, specifically if there's a CM error. If `init_path` fails, the tracepoint gets called with a partially initialized `kobj` β crucially, the `kobj->name` will be NULL. This is triggered through sysfs using `add_path`, which, as a `DEVICE_ATTR_RW`, is only writable by root.
Essentially, a NULL pointer dereference is happening within a tracepoint, and it is triggered when an RDMA connection attempt goes south, specifically when the tracepoint tries to print the uninitialized kobject name. This requires root access to initiate the connection attempt through sysfs (writing to `add_path`), but the crash itself can potentially be triggered by a remote server rejecting the connection.
Now, let's assess the implications. It's not exploitable for privilege escalation or memory corruption. The kernel will simply oops, the thread will be killed, and the system experiences a denial-of-service.
Here's a quick summary of the dimensions:
* **Exploitable:** False. We're talking about a read from a NULL pointer, causing a kernel oops, specifically a page fault because modern Linux kernels don't allow reads from address 0.
* **Denial of Service:** True. The oops causes the RDMA CM thread or workqueue worker to be killed, potentially leading to a hung subsystem or other issues.
* **Privilege Required:** Root. Needs root to write to sysfs.
* **User Namespace Access:** No, can't write to this sysfs from a user namespace.
* **VM Guest Trigger:** No, this is a driver-level issue, not specific to virtual machines.
* **VM Host Confidential Computing Context Trigger:** No.
* **Network Trigger:** True. The trigger itself comes from an RDMA CM event generated by a network packet (like a reject), but this is initiated by a privileged user, a remote server *can* trigger this by sending a reject.
* **Other Remote Trigger:** False.
* **Peripheral Trigger:** False.
* **Malicious Filesystem Trigger:** False.
I've confirmed the `memcpy` from NULL scenario is not exploitable for code execution. It will trigger a page fault, which the kernel will handle as an unhandled kernel page fault. This results in the thread dying and a DoS. No security risk in terms of code execution or privilege escalation.
Additionally, I've confirmed that `kobject_name` returns `kobj->name`, and in this case, `kobj` is zeroed by `kzalloc`, meaning `kobj->name` is definitively NULL.
Now, the crucial question is whether an *unprivileged* user can trigger this. Based on my review, the RNBD client is configured via sysfs, and there are no other interfaces like ioctls or netlink, so I am confident that root is required to trigger this.
|
| 67/2 |
2026/09/04 01:01 |
tool |
grepper |
0m
Args: map[Expression:rnbd_clt_map_device]
Results: map[Output:drivers/block/rnbd/rnbd-clt-sysfs.c=491=static int rnbd_clt_add_dev_kobj(struct rnbd_clt_dev *dev)
--
drivers/block/rnbd/rnbd-clt-sysfs.c-507-
drivers/block/rnbd/rnbd-clt-sysfs.c:508:static ssize_t rnbd_clt_map_device_show(struct kobject *kobj,
drivers/block/rnbd/rnbd-clt-sysfs.c-509- struct kobj_attribute *attr,
--
drivers/block/rnbd/rnbd-clt-sysfs.c=534=static int rnbd_clt_add_dev_symlink(struct rnbd_clt_dev *dev)
--
drivers/block/rnbd/rnbd-clt-sysfs.c-569-
drivers/block/rnbd/rnbd-clt-sysfs.c:570:static ssize_t rnbd_clt_map_device_store(struct kobject *kobj,
drivers/block/rnbd/rnbd-clt-sysfs.c-571- struct kobj_attribute *attr,
--
drivers/block/rnbd/rnbd-clt-sysfs.c-611-
drivers/block/rnbd/rnbd-clt-sysfs.c:612: dev = rnbd_clt_map_device(sessname, paths, path_cnt, port_nr, pathname,
drivers/block/rnbd/rnbd-clt-sysfs.c-613- access_mode, nr_poll_queues);
--
drivers/block/rnbd/rnbd-clt-sysfs.c-636-
drivers/block/rnbd/rnbd-clt-sysfs.c:637:static struct kobj_attribute rnbd_clt_map_device_attr =
drivers/block/rnbd/rnbd-clt-sysfs.c-638- __ATTR(map_device, 0644,
drivers/block/rnbd/rnbd-clt-sysfs.c:639: rnbd_clt_map_device_show, rnbd_clt_map_device_store);
drivers/block/rnbd/rnbd-clt-sysfs.c-640-
drivers/block/rnbd/rnbd-clt-sysfs.c=641=static struct attribute *default_attrs[] = {
drivers/block/rnbd/rnbd-clt-sysfs.c:642: &rnbd_clt_map_device_attr.attr,
drivers/block/rnbd/rnbd-clt-sysfs.c-643- NULL,
--
drivers/block/rnbd/rnbd-clt.c=482=static void msg_open_conf(struct work_struct *work)
--
drivers/block/rnbd/rnbd-clt.c-489-
drivers/block/rnbd/rnbd-clt.c:490: /* INIT state is only triggered from rnbd_clt_map_device */
drivers/block/rnbd/rnbd-clt.c-491- if (dev->dev_state == DEV_STATE_INIT)
--
drivers/block/rnbd/rnbd-clt.c-508- }
drivers/block/rnbd/rnbd-clt.c:509: /* We free rsp in rnbd_clt_map_device for map scenario */
drivers/block/rnbd/rnbd-clt.c-510- if (!from_map)
--
drivers/block/rnbd/rnbd-clt.c=1521=static void rnbd_delete_dev(struct rnbd_clt_dev *dev)
--
drivers/block/rnbd/rnbd-clt.c-1529-
drivers/block/rnbd/rnbd-clt.c:1530:struct rnbd_clt_dev *rnbd_clt_map_device(const char *sessname,
drivers/block/rnbd/rnbd-clt.c-1531- struct rtrs_addr *paths,
--
drivers/block/rnbd/rnbd-clt.h=108=struct rnbd_clt_dev {
--
drivers/block/rnbd/rnbd-clt.h-130-
drivers/block/rnbd/rnbd-clt.h:131:struct rnbd_clt_dev *rnbd_clt_map_device(const char *sessname,
drivers/block/rnbd/rnbd-clt.h-132- struct rtrs_addr *paths,
]
|
| 68/2 |
2026/09/04 01:01 |
llm |
expert |
0m
Model:
Tokens:
input: 54877
output: 21
thoughts: 233
Thoughts: **My Assessment of the Security Implications**
Okay, let me think this through. So, `rnbd_clt_map_device` is *only* called from `rnbd_clt_map_device_store`, which is explicitly a sysfs store function. Then `rtrs_clt_open` is only called from `find_and_get_or_create_sess`, which is itself only called from `rnbd_clt_map_device`. That means, the only direct path to executing `rtrs_clt_open` *appears* to be through the sysfs interface.
Given that sysfs entries are owned by root and have a mode of 0644, that means only root can actually write to them. Thus, from a standard unprivileged process perspective, this code path is inaccessible, which is good.
But⦠I need to be absolutely sure. Is there *any* other conceivable way to trigger `rtrs_clt_open`?
Wait a second⦠I'm seeing `__UNIQUE_ID_addressable_rtrs_clt_open_879` and `__gendwarfksyms_ptr_rtrs_clt_open`. The fact that those symbols are there means `rtrs_clt_open` is being exported using `EXPORT_SYMBOL`. That significantly changes things. I need to know if any other modules are using that function. That's the next critical question.
|
| 69/2 |
2026/09/04 01:01 |
tool |
grepper |
0m
Args: map[Expression:rtrs_clt_open]
Results: map[Output:drivers/block/rnbd/rnbd-clt.c=1230=find_and_get_or_create_sess(const char *sessname,
--
drivers/block/rnbd/rnbd-clt.c-1267- */
drivers/block/rnbd/rnbd-clt.c:1268: sess->rtrs = rtrs_clt_open(&rtrs_ops, sessname,
drivers/block/rnbd/rnbd-clt.c-1269- paths, path_cnt, port_nr,
--
drivers/infiniband/ulp/rtrs/rtrs-clt.c=2125=static void rtrs_clt_path_up(struct rtrs_clt_path *clt_path)
--
drivers/infiniband/ulp/rtrs/rtrs-clt.c-2131- * We can fire RECONNECTED event only when all paths were
drivers/infiniband/ulp/rtrs/rtrs-clt.c:2132: * connected on rtrs_clt_open(), then each was disconnected
drivers/infiniband/ulp/rtrs/rtrs-clt.c-2133- * and the first one connected again. That's why this nasty
--
drivers/infiniband/ulp/rtrs/rtrs-clt.c-2140- * Here it is safe to access paths num directly since up counter
drivers/infiniband/ulp/rtrs/rtrs-clt.c:2141: * is greater than MAX_PATHS_NUM only while rtrs_clt_open() is
drivers/infiniband/ulp/rtrs/rtrs-clt.c-2142- * in progress, thus paths removals are impossible.
--
drivers/infiniband/ulp/rtrs/rtrs-clt.c=2171=static void rtrs_clt_stop_and_destroy_conns(struct rtrs_clt_path *clt_path)
--
drivers/infiniband/ulp/rtrs/rtrs-clt.c-2178- /*
drivers/infiniband/ulp/rtrs/rtrs-clt.c:2179: * Possible race with rtrs_clt_open(), when DEVICE_REMOVAL comes
drivers/infiniband/ulp/rtrs/rtrs-clt.c-2180- * exactly in between. Start destroying after it finishes.
--
drivers/infiniband/ulp/rtrs/rtrs-clt.c=2789=static void free_clt(struct rtrs_clt_sess *clt)
--
drivers/infiniband/ulp/rtrs/rtrs-clt.c-2799-/**
drivers/infiniband/ulp/rtrs/rtrs-clt.c:2800: * rtrs_clt_open() - Open a path to an RTRS server
drivers/infiniband/ulp/rtrs/rtrs-clt.c-2801- * @ops: holds the link event callback and the private pointer.
--
drivers/infiniband/ulp/rtrs/rtrs-clt.c-2816- */
drivers/infiniband/ulp/rtrs/rtrs-clt.c:2817:struct rtrs_clt_sess *rtrs_clt_open(struct rtrs_clt_ops *ops,
drivers/infiniband/ulp/rtrs/rtrs-clt.c-2818- const char *pathname,
--
drivers/infiniband/ulp/rtrs/rtrs-clt.c-2890-}
drivers/infiniband/ulp/rtrs/rtrs-clt.c:2891:EXPORT_SYMBOL(rtrs_clt_open);
drivers/infiniband/ulp/rtrs/rtrs-clt.c-2892-
--
drivers/infiniband/ulp/rtrs/rtrs.h=40=struct rtrs_addr {
--
drivers/infiniband/ulp/rtrs/rtrs.h-48- * @link_ev: Event notification callback function for connection state changes
drivers/infiniband/ulp/rtrs/rtrs.h:49: * @priv: User supplied data that was passed to rtrs_clt_open()
drivers/infiniband/ulp/rtrs/rtrs.h-50- * @ev: Occurred event
--
drivers/infiniband/ulp/rtrs/rtrs.h=52=struct rtrs_clt_ops {
--
drivers/infiniband/ulp/rtrs/rtrs.h-56-
drivers/infiniband/ulp/rtrs/rtrs.h:57:struct rtrs_clt_sess *rtrs_clt_open(struct rtrs_clt_ops *ops,
drivers/infiniband/ulp/rtrs/rtrs.h-58- const char *pathname,
]
|
| 70/2 |
2026/09/04 01:01 |
llm |
expert |
0m
Model:
Tokens:
input: 56721
output: 66
thoughts: 809
Thoughts: **My Analysis of the `rtrs_rdma_error_recovery` Kernel Bug**
Okay, so it looks like this bug is solely triggered through `rnbd-clt.c`. That means the only way to get to it is by interacting with the RNBD client sysfs interface. Let's break down what that means for exploitability.
The initial assessment is: Exploitability is false, but Denial of Service is true. It requires local root, and it's not user namespace escapable or triggered within a VM guest or host, or by a peripheral. Initially, I thought it was network triggered, which I now realize requires a bit more nuance.
My thought process continues. The bug is triggered by an RDMA CM event, specifically, when the client tries to connect to a server. That RDMA CM event is generated by processing an incoming network packet, like a rejection or error from the server. Yes, local root is needed to *initiate* the connection using sysfs. The crash is initiated by a network packet. So, a malicious *server* can, in fact, cause a crash, making this a network trigger. It fits the definition, I think.
The key question is, is it Ethernet? It appears that the trigger happens over RDMA over Converged Ethernet (RoCE), which *is* Ethernet. While InfiniBand isn't, RoCE certainly is. The prompt's language specifically asks about ingress Ethernet traffic and drivers exposed to network data. This fits.
Now I need to ensure I am thorough. I am going to check if there are other paths to `rtrs_rdma_error_recovery`. Digging into the code, I see it's called from several functions: `rtrs_clt_rdma_cm_handler`, `rtrs_clt_fast_reg_done`, `rtrs_clt_rdma_done`, `rtrs_clt_recv_done`, and `rtrs_clt_hb_err_handler`. In each case, `trace_rtrs_rdma_error_recovery(clt_path)` is invoked. If `clt_path->kobj` is uninitialized, boom, crash. When does `clt_path->kobj` get initialized? During `rtrs_clt_open`, when `init_path` is called.
The analysis is starting to take shape. `init_path` establishes connections, sends path info, starts the heartbeat. If `init_path` *succeeds*, then `rtrs_clt_create_path_files` is called, and `clt_path->kobj` is initialized.
A-ha! If *any* error happens during `init_path` (CM error, fast reg failure, receive failure, you name it), `rtrs_rdma_error_recovery` gets called, and it crashes. But wait, if `init_path` *fails* synchronously, `rtrs_clt_open` cleans up and returns an error! However, the error recovery seems to be asynchronous. The code uses `create_cm`, which means the connection needs to be established and then the handler is called.
Okay, so any failure during connection establishment, synchronous or asynchronous, *will* crash the kernel. A simple attempt to connect to a server that's unreachable or actively rejecting connections will trigger this DoS. It is reliable. But, again, root is needed.
|
| 71/2 |
2026/09/04 01:01 |
tool |
set-results |
0m
Args: map[DenialOfService:true Exploitable:false FilesystemTrigger:false NetworkTrigger:true PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:false VMGuestTrigger:false VMHostTrigger:false]
Results: map[DenialOfService:true Exploitable:false FilesystemTrigger:false NetworkTrigger:true PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:false VMGuestTrigger:false VMHostTrigger:false]
|
| 72/2 |
2026/09/04 01:01 |
llm |
expert |
0m
Model:
Tokens:
input: 58399
output: 633
thoughts: 490
Thoughts: **Final Reasoning on the RDMA Bug**
Okay, the analysis is complete, and it looks like we have a NULL pointer dereference, specifically in the `rtrs_rdma_error_recovery` tracepoint. The scenario unfolds like this: an RDMA connection attempt fails, for whatever reason β maybe the server is unreachable, maybe it rejects the connection. This triggers the asynchronous `rtrs_clt_rdma_cm_handler`, which then calls `rtrs_rdma_error_recovery`. Here's where the problem arises. The `trace_rtrs_rdma_error_recovery` tracepoint tries to grab the session name using `kobject_name(&clt_path->kobj)`. The issue is, `clt_path->kobj` is only initialized in `rtrs_clt_create_path_files`, and that function is only called *after* a successful connection setup (specifically, after `init_path` returns without errors).
Since the connection failed, `clt_path->kobj` remains uninitialized, essentially zeroed out by `kzalloc_flex`. This means `kobj->name` is NULL. The tracepoint then foolishly attempts to copy this NULL pointer with `memcpy`, which results in a classic kernel oops when it tries to read from address 0.
The impact? A kernel oops that will likely take down the RDMA CM thread or worker thread, resulting in a denial-of-service. Thankfully, it's not exploitable for privilege escalation or memory corruption because we're talking about a read from a NULL pointer, which is reliably unmapped and faults.
To trigger this, youβd need an RNBD (RDMA Network Block Device) connection attempt to a server that then rejects or can't handle the connection. RNBD connections are initiated by writing to the `/sys/class/rnbd-client/ctl/map_device` sysfs file, which is root-owned and has 0644 permissions. So, no privilege escalation there. This limits the trigger to the global root user. However, a root user attempting to connect to a remote server can be tripped up if that server rejects the RDMA connection, either by sending an RDMA CM reject or an error packet. This is triggered by network ingress (Ethernet/RoCE), making it a network-triggered vulnerability.
|
| 73/1 |
2026/09/04 01:01 |
action |
format-explanation |
0m
Results: map[Explanation:Based on the analysis of the bug report and the source code, here is the
assessment of the security impact:
**Bug Mechanism:**
The bug is a NULL pointer dereference in the `trace_rtrs_rdma_error_recovery`
tracepoint.
When an RDMA connection attempt fails (e.g., the remote server rejects the
connection or is unreachable), the RDMA CM event handler
`rtrs_clt_rdma_cm_handler` is invoked asynchronously. This handler calls
`rtrs_rdma_error_recovery`, which in turn triggers the
`trace_rtrs_rdma_error_recovery` tracepoint.
The tracepoint attempts to copy the session name using
`memcpy(__entry->sessname, kobject_name(&clt_path->kobj), NAME_MAX)`. However,
`clt_path->kobj` is only initialized in `rtrs_clt_create_path_files()`, which is
called *after* the connection is successfully established (i.e., after
`init_path()` returns successfully).
Because the connection failed, `clt_path->kobj` remains uninitialized (zeroed
out during allocation), meaning `kobj->name` is `NULL`. The tracepoint then
passes this `NULL` pointer to `memcpy`, resulting in a kernel oops when it tries
to read from address 0.
**Exploitability:**
This is strictly a read from a `NULL` pointer (`memcpy` reading from `NULL`). On
modern Linux systems, address 0 is unmapped (protected by `mmap_min_addr`), so
the read will reliably cause a page fault and a kernel oops. It does not lead to
memory corruption, information leaks, or privilege escalation. Therefore, it is
**not exploitable**.
**Denial of Service:**
The kernel oops will kill the RDMA CM thread or the workqueue worker thread
handling the event. This can leave locks held, leak resources, and hang the
RNBD/RTRS subsystem, resulting in a **Denial of Service**.
**Privilege Requirements:**
To trigger this bug, a user must initiate an RNBD (RDMA Network Block Device)
connection. This is done by writing to the
`/sys/class/rnbd-client/ctl/map_device` sysfs file (or similar sysfs
interfaces). These sysfs files are owned by root and have `0644` permissions,
meaning only the global root user can write to them. Therefore, the bug **cannot
be triggered by unprivileged users** or from within **user namespaces** (as
sysfs is not writable in this context).
**Network Trigger:**
If a root user attempts to connect to a remote server, that server can
intentionally trigger the bug by rejecting the RDMA connection (sending an RDMA
CM reject or error packet over RoCE/Ethernet). Because the crash is ultimately
triggered by processing this ingress network packet during the connection
handshake, it qualifies as an **Ethernet Network Trigger**.]
|