| 0/0 |
2026/09/21 00:03 |
flow |
assessment-security |
1h07m
Results: map[DenialOfService:false Explanation:**Bug Analysis:**
The bug report highlights a warning message: `IPv6: BUG: Address 2001::fb on
device lo is missing its host route.` This message is generated by a `pr_warn()`
call in `__ipv6_ifa_notify()` located in `net/ipv6/addrconf.c`.
**Root Cause:**
The issue is a race condition involving IPv6 Duplicate Address Detection (DAD)
and interface state changes when the `keep_addr_on_down` sysctl is enabled.
1. The reproducer sets `/proc/sys/net/ipv6/conf/all/keep_addr_on_down` to `1`.
2. It adds a permanent IPv6 address (`2001::fb`) to the loopback interface
(`lo`) via a netlink `RTM_NEWADDR` message. This schedules DAD work
(`addrconf_dad_work`).
3. It then toggles the `lo` interface state (UP then DOWN).
4. When the interface is brought DOWN, `addrconf_ifdown()` is invoked. Because
`keep_addr_on_down` is enabled, the IPv6 address is kept, but its host route is
removed (`ifa->rt = NULL`), and `addrconf_del_dad_work()` is called to cancel
the pending DAD work.
5. However, `addrconf_del_dad_work()` uses `cancel_delayed_work()`, which does
not synchronously wait for the work to finish if it is already executing.
6. If the DAD work is already running concurrently and completes, it calls
`addrconf_dad_completed()`, which in turn calls `ipv6_ifa_notify(RTM_NEWADDR,
ifp)`.
7. Inside `__ipv6_ifa_notify()`, the code checks if the interface is UP and if
the route is missing. If the interface was quickly brought back UP (or due to
the race), the condition `!ifp->rt && (ifp->idev->dev->flags & IFF_UP)`
evaluates to true, triggering the `pr_warn()`.
**Security Dimensions:**
* **Exploitable: NO**
The bug is purely a logical race condition that results in a harmless
`pr_warn()` message. There is no memory corruption, use-after-free,
out-of-bounds access, uninitialized memory usage, or information leak. The
kernel safely handles the missing route by skipping the route insertion and
continuing execution normally.
* **Denial of Service: NO**
The warning does not halt the kernel, cause a panic, deadlock, or hang. It
is a non-fatal warning (`pr_warn`, not `BUG()` or `panic()`) that merely
logs the unexpected state. The system continues to operate normally.
* **Accessible From Unprivileged Processes: NO**
Triggering this bug requires modifying network interface flags
(`SIOCSIFFLAGS`), adding an IPv6 address (`RTM_NEWADDR`), and writing to the
`keep_addr_on_down` sysctl. All of these operations require `CAP_NET_ADMIN`
privileges.
* **Accessible From User Namespaces: YES**
An unprivileged user can create a new user and network namespace
(`CLONE_NEWUSER | CLONE_NEWNET`), gaining `CAP_NET_ADMIN` within that
namespace. Inside the namespace, they can mount their own `/proc`, modify
the `keep_addr_on_down` sysctl, configure the `lo` interface, and trigger
the race condition.
* **VM Guest / VM Host / Network / Remote / Peripheral / Filesystem Triggers:
NO**
The issue is strictly related to local network administration tasks
(interface state toggling and address configuration) and cannot be triggered
by external network traffic, guest/host interactions, peripherals, or
malicious filesystems. Exploitable:false FilesystemTrigger:false NetworkTrigger:false PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:true VMGuestTrigger:false VMHostTrigger:false]
|
| 1/1 |
2026/09/21 00:03 |
action |
syz-repro-to-c-repro |
0m
Results: map[SimplifiedCRepro:// autogenerated by syzkaller (https://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#ifndef __NR_ioctl
#define __NR_ioctl 54
#endif
#ifndef __NR_mkdirat
#define __NR_mkdirat 296
#endif
#ifndef __NR_mmap
#define __NR_mmap 192
#endif
#ifndef __NR_mount
#define __NR_mount 21
#endif
#ifndef __NR_openat
#define __NR_openat 295
#endif
#ifndef __NR_sendmsg
#define __NR_sendmsg 370
#endif
#ifndef __NR_socket
#define __NR_socket 359
#endif
#ifndef __NR_write
#define __NR_write 4
#endif
#undef __NR_mmap
#define __NR_mmap __NR_mmap2
uint64_t r[5] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff};
int main(void)
{
syscall(__NR_mmap, /*addr=*/0x7ffff000, /*len=*/0x1000, /*prot=*/0, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32, /*fd=*/(intptr_t)-1, /*offset=*/0);
syscall(__NR_mmap, /*addr=*/0x80000000, /*len=*/0x1000000, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/7, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32, /*fd=*/(intptr_t)-1, /*offset=*/0);
syscall(__NR_mmap, /*addr=*/0x81000000, /*len=*/0x1000, /*prot=*/0, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32, /*fd=*/(intptr_t)-1, /*offset=*/0);
const char* reason;
(void)reason;
intptr_t res = 0;
if (write(1, "executing program\n", sizeof("executing program\n") - 1)) {}
// socket$nl_route arguments: [
// domain: const = 0x10 (4 bytes)
// type: const = 0x3 (4 bytes)
// proto: const = 0x0 (4 bytes)
// ]
// returns sock_nl_route
res = syscall(__NR_socket, /*domain=*/0x10, /*type=*/3, /*proto=*/0);
if (res != -1)
r[0] = res;
// sendmsg$nl_route arguments: [
// fd: sock_nl_route (resource)
// msg: ptr[in, msghdr_netlink[netlink_msg_route]] {
// msghdr_netlink[netlink_msg_route] {
// addr: nil
// addrlen: len = 0x0 (4 bytes)
// vec: ptr[in, iovec[in, netlink_msg_route]] {
// iovec[in, netlink_msg_route] {
// addr: ptr[inout, array[ANYUNION]] {
// array[ANYUNION] {
// union ANYUNION {
// ANYBLOB: buffer: {30 00 00 00 10 00 01 08 2a bd 62 00 00 00 00 00 00 00 00 00} (length 0x14)
// }
// union ANYUNION {
// ANYRES32: ANYRES32 (resource)
// }
// union ANYUNION {
// ANYBLOB: buffer: {00 00 00 00 00 00 00 00 08 00 04 00 44 00 00 00 08 00 1b} (length 0x13)
// }
// }
// }
// len: len = 0x30 (4 bytes)
// }
// }
// vlen: const = 0x1 (4 bytes)
// ctrl: const = 0x0 (4 bytes)
// ctrllen: const = 0x0 (4 bytes)
// f: send_flags = 0x0 (4 bytes)
// }
// }
// f: send_flags = 0x10 (4 bytes)
// ]
*(uint32_t*)0x80000140 = 0;
*(uint32_t*)0x80000144 = 0;
*(uint32_t*)0x80000148 = 0x80000080;
*(uint32_t*)0x80000080 = 0x80000180;
memcpy((void*)0x80000180, "\x30\x00\x00\x00\x10\x00\x01\x08\x2a\xbd\x62\x00\x00\x00\x00\x00\x00\x00\x00\x00", 20);
*(uint32_t*)0x80000194 = 0;
memcpy((void*)0x80000198, "\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x04\x00\x44\x00\x00\x00\x08\x00\x1b", 19);
*(uint32_t*)0x80000084 = 0x30;
*(uint32_t*)0x8000014c = 1;
*(uint32_t*)0x80000150 = 0;
*(uint32_t*)0x80000154 = 0;
*(uint32_t*)0x80000158 = 0;
syscall(__NR_sendmsg, /*fd=*/(intptr_t)r[0], /*msg=*/0x80000140, /*f=MSG_PROBE*/0x10);
// mkdirat arguments: [
// fd: fd_dir (resource)
// path: ptr[in, buffer] {
// buffer: {2e 2f 70 72 6f 63 00} (length 0x7)
// }
// mode: open_mode = 0x1ff (4 bytes)
// ]
memcpy((void*)0x80000040, "./proc\000", 7);
syscall(__NR_mkdirat, /*fd=*/0xffffff9c, /*path=*/0x80000040, /*mode=S_IXOTH|S_IWOTH|S_IROTH|S_IXGRP|S_IWGRP|S_IRGRP|S_IXUSR|S_IWUSR|0x100*/0x1ff);
// mount arguments: [
// src: nil
// dst: ptr[in, buffer] {
// buffer: {2e 2f 70 72 6f 63 00} (length 0x7)
// }
// type: ptr[in, buffer] {
// buffer: {70 72 6f 63 00} (length 0x5)
// }
// flags: mount_flags = 0x0 (4 bytes)
// data: nil
// ]
memcpy((void*)0x80000100, "./proc\000", 7);
memcpy((void*)0x800001c0, "proc\000", 5);
syscall(__NR_mount, /*src=*/0, /*dst=*/0x80000100, /*type=*/0x800001c0, /*flags=*/0, /*data=*/0);
// openat arguments: [
// fd: fd_dir (resource)
// file: ptr[in, buffer] {
// buffer: {2e 2f 70 72 6f 63 2f 73 79 73 2f 6e 65 74 2f 69 70 76 36 2f 63 6f 6e 66 2f 61 6c 6c 2f 6b 65 65 70 5f 61 64 64 72 5f 6f 6e 5f 64 6f 77 6e 00} (length 0x2f)
// }
// flags: open_flags = 0x1 (4 bytes)
// mode: open_mode = 0x0 (2 bytes)
// ]
// returns fd
memcpy((void*)0x80000240, "./proc/sys/net/ipv6/conf/all/keep_addr_on_down\000", 47);
res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x80000240, /*flags=O_WRONLY*/1, /*mode=*/0);
if (res != -1)
r[1] = res;
// write arguments: [
// fd: fd (resource)
// buf: ptr[in, buffer] {
// buffer: {31 0a 00} (length 0x3)
// }
// count: len = 0x2 (4 bytes)
// ]
memcpy((void*)0x80000280, "1\n\000", 3);
syscall(__NR_write, /*fd=*/(intptr_t)r[1], /*buf=*/0x80000280, /*count=*/2);
// socket$nl_route arguments: [
// domain: const = 0x10 (4 bytes)
// type: const = 0x3 (4 bytes)
// proto: const = 0x0 (4 bytes)
// ]
// returns sock_nl_route
res = syscall(__NR_socket, /*domain=*/0x10, /*type=*/3, /*proto=*/0);
if (res != -1)
r[2] = res;
// ioctl$sock_SIOCGIFINDEX arguments: [
// fd: sock (resource)
// cmd: const = 0x8933 (4 bytes)
// arg: ptr[out, ifreq_dev_t[devnames, ifindex]] {
// ifreq_dev_t[devnames, ifindex] {
// ifr_ifrn: buffer: {6c 6f 00 00 00 00 00 00 00 00 00 00 00 00 00 00} (length 0x10)
// elem: ifindex (resource)
// pad = 0x0 (12 bytes)
// }
// }
// ]
memcpy((void*)0x800000c0, "lo\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 16);
res = syscall(__NR_ioctl, /*fd=*/(intptr_t)r[2], /*cmd=*/0x8933, /*arg=*/0x800000c0);
if (res != -1)
r[3] = *(uint32_t*)0x800000d0;
// sendmsg$nl_route arguments: [
// fd: sock_nl_route (resource)
// msg: ptr[in, msghdr_netlink[netlink_msg_route]] {
// msghdr_netlink[netlink_msg_route] {
// addr: nil
// addrlen: len = 0x0 (4 bytes)
// vec: ptr[in, iovec[in, netlink_msg_route]] {
// iovec[in, netlink_msg_route] {
// addr: ptr[inout, array[ANYUNION]] {
// array[ANYUNION] {
// union ANYUNION {
// ANYBLOB: buffer: {34 00 00 00 14 00 01 04 00 00 00 00 00 00 00 00 0a 40 00 00} (length 0x14)
// }
// union ANYUNION {
// ANYRES32: ANYRES32 (resource)
// }
// union ANYUNION {
// ANYBLOB: buffer: {14 00 01 00 20 01 00 00 00 00 00 00 00 00 00 00 00 00 00 fb c3 ef 54 ea 46 ad ee 6a 01} (length 0x1d)
// }
// }
// }
// len: len = 0x34 (4 bytes)
// }
// }
// vlen: const = 0x1 (4 bytes)
// ctrl: const = 0x0 (4 bytes)
// ctrllen: const = 0x0 (4 bytes)
// f: send_flags = 0x0 (4 bytes)
// }
// }
// f: send_flags = 0x0 (4 bytes)
// ]
*(uint32_t*)0x80000140 = 0;
*(uint32_t*)0x80000144 = 0;
*(uint32_t*)0x80000148 = 0x80000080;
*(uint32_t*)0x80000080 = 0x80000000;
memcpy((void*)0x80000000, "\x34\x00\x00\x00\x14\x00\x01\x04\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x40\x00\x00", 20);
*(uint32_t*)0x80000014 = r[3];
memcpy((void*)0x80000018, "\x14\x00\x01\x00\x20\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfb\xc3\xef\x54\xea\x46\xad\xee\x6a\x01", 29);
*(uint32_t*)0x80000084 = 0x34;
*(uint32_t*)0x8000014c = 1;
*(uint32_t*)0x80000150 = 0;
*(uint32_t*)0x80000154 = 0;
*(uint32_t*)0x80000158 = 0;
syscall(__NR_sendmsg, /*fd=*/(intptr_t)r[2], /*msg=*/0x80000140, /*f=*/0);
// socket$inet6 arguments: [
// domain: const = 0xa (4 bytes)
// type: socket_type = 0x2 (4 bytes)
// proto: int32 = 0x0 (4 bytes)
// ]
// returns sock_in6
res = syscall(__NR_socket, /*domain=*/0xa, /*type=SOCK_DGRAM*/2, /*proto=*/0);
if (res != -1)
r[4] = res;
// ioctl$sock_inet_SIOCSIFFLAGS arguments: [
// fd: sock (resource)
// cmd: const = 0x8914 (4 bytes)
// arg: ptr[in, ifreq_dev_t[devnames, flags[ifru_flags, int16]]] {
// ifreq_dev_t[devnames, flags[ifru_flags, int16]] {
// ifr_ifrn: buffer: {6c 6f 00 00 00 00 00 00 00 00 00 00 00 00 00 00} (length 0x10)
// elem: ifru_flags = 0x1 (2 bytes)
// pad = 0x0 (14 bytes)
// }
// }
// ]
memcpy((void*)0x80000200, "lo\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 16);
*(uint16_t*)0x80000210 = 1;
syscall(__NR_ioctl, /*fd=*/(intptr_t)r[4], /*cmd=*/0x8914, /*arg=*/0x80000200);
// ioctl$sock_inet_SIOCSIFFLAGS arguments: [
// fd: sock (resource)
// cmd: const = 0x8914 (4 bytes)
// arg: ptr[in, ifreq_dev_t[devnames, flags[ifru_flags, int16]]] {
// ifreq_dev_t[devnames, flags[ifru_flags, int16]] {
// ifr_ifrn: buffer: {6c 6f 00 00 00 00 00 00 00 00 00 00 00 00 00 00} (length 0x10)
// elem: ifru_flags = 0x0 (2 bytes)
// pad = 0x0 (14 bytes)
// }
// }
// ]
memcpy((void*)0x80000200, "lo\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 16);
*(uint16_t*)0x80000210 = 0;
syscall(__NR_ioctl, /*fd=*/(intptr_t)r[4], /*cmd=*/0x8914, /*arg=*/0x80000200);
return 0;
}
]
|
| 2/1 |
2026/09/21 00:04 |
action |
kernel-checkouter |
1m
Results: map[KernelSrc:/app/workdir/cache/src/6a5694d0d7f5fe4878778cd6fa701c2edba3554a]
|
| 3/1 |
2026/09/21 00:05 |
action |
kernel-builder |
29m
Results: map[KernelObj:/app/workdir/cache/build/af0c8781c4e73c6a587169d4d2faf0473e7e5233]
|
| 4/1 |
2026/09/21 00:35 |
action |
codesearch-prepare |
21m
Results: map[Index:codesearch-index]
|
| 5/1 |
2026/09/21 00:57 |
agent |
expert |
14m
Model:
Results: map[DenialOfService:false Exploitable:false FilesystemTrigger:false NetworkTrigger:false PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:true 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:
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
IPv6: BUG: Address 2001::fb on device lo is missing its host route.
It is reproducible with the followint program.
Keep in mind that it may lack the precise threading, sandboxing, and some arguments of a working reproducer.
But it should give an idea of the involved syscalls.
// autogenerated by syzkaller (https://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#ifndef __NR_ioctl
#define __NR_ioctl 54
#endif
#ifndef __NR_mkdirat
#define __NR_mkdirat 296
#endif
#ifndef __NR_mmap
#define __NR_mmap 192
#endif
#ifndef __NR_mount
#define __NR_mount 21
#endif
#ifndef __NR_openat
#define __NR_openat 295
#endif
#ifndef __NR_sendmsg
#define __NR_sendmsg 370
#endif
#ifndef __NR_socket
#define __NR_socket 359
#endif
#ifndef __NR_write
#define __NR_write 4
#endif
#undef __NR_mmap
#define __NR_mmap __NR_mmap2
uint64_t r[5] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff};
int main(void)
{
syscall(__NR_mmap, /*addr=*/0x7ffff000, /*len=*/0x1000, /*prot=*/0, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32, /*fd=*/(intptr_t)-1, /*offset=*/0);
syscall(__NR_mmap, /*addr=*/0x80000000, /*len=*/0x1000000, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/7, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32, /*fd=*/(intptr_t)-1, /*offset=*/0);
syscall(__NR_mmap, /*addr=*/0x81000000, /*len=*/0x1000, /*prot=*/0, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32, /*fd=*/(intptr_t)-1, /*offset=*/0);
const char* reason;
(void)reason;
intptr_t res = 0;
if (write(1, "executing program\n", sizeof("executing program\n") - 1)) {}
// socket$nl_route arguments: [
// domain: const = 0x10 (4 bytes)
// type: const = 0x3 (4 bytes)
// proto: const = 0x0 (4 bytes)
// ]
// returns sock_nl_route
res = syscall(__NR_socket, /*domain=*/0x10, /*type=*/3, /*proto=*/0);
if (res != -1)
r[0] = res;
// sendmsg$nl_route arguments: [
// fd: sock_nl_route (resource)
// msg: ptr[in, msghdr_netlink[netlink_msg_route]] {
// msghdr_netlink[netlink_msg_route] {
// addr: nil
// addrlen: len = 0x0 (4 bytes)
// vec: ptr[in, iovec[in, netlink_msg_route]] {
// iovec[in, netlink_msg_route] {
// addr: ptr[inout, array[ANYUNION]] {
// array[ANYUNION] {
// union ANYUNION {
// ANYBLOB: buffer: {30 00 00 00 10 00 01 08 2a bd 62 00 00 00 00 00 00 00 00 00} (length 0x14)
// }
// union ANYUNION {
// ANYRES32: ANYRES32 (resource)
// }
// union ANYUNION {
// ANYBLOB: buffer: {00 00 00 00 00 00 00 00 08 00 04 00 44 00 00 00 08 00 1b} (length 0x13)
// }
// }
// }
// len: len = 0x30 (4 bytes)
// }
// }
// vlen: const = 0x1 (4 bytes)
// ctrl: const = 0x0 (4 bytes)
// ctrllen: const = 0x0 (4 bytes)
// f: send_flags = 0x0 (4 bytes)
// }
// }
// f: send_flags = 0x10 (4 bytes)
// ]
*(uint32_t*)0x80000140 = 0;
*(uint32_t*)0x80000144 = 0;
*(uint32_t*)0x80000148 = 0x80000080;
*(uint32_t*)0x80000080 = 0x80000180;
memcpy((void*)0x80000180, "\x30\x00\x00\x00\x10\x00\x01\x08\x2a\xbd\x62\x00\x00\x00\x00\x00\x00\x00\x00\x00", 20);
*(uint32_t*)0x80000194 = 0;
memcpy((void*)0x80000198, "\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x04\x00\x44\x00\x00\x00\x08\x00\x1b", 19);
*(uint32_t*)0x80000084 = 0x30;
*(uint32_t*)0x8000014c = 1;
*(uint32_t*)0x80000150 = 0;
*(uint32_t*)0x80000154 = 0;
*(uint32_t*)0x80000158 = 0;
syscall(__NR_sendmsg, /*fd=*/(intptr_t)r[0], /*msg=*/0x80000140, /*f=MSG_PROBE*/0x10);
// mkdirat arguments: [
// fd: fd_dir (resource)
// path: ptr[in, buffer] {
// buffer: {2e 2f 70 72 6f 63 00} (length 0x7)
// }
// mode: open_mode = 0x1ff (4 bytes)
// ]
memcpy((void*)0x80000040, "./proc\000", 7);
syscall(__NR_mkdirat, /*fd=*/0xffffff9c, /*path=*/0x80000040, /*mode=S_IXOTH|S_IWOTH|S_IROTH|S_IXGRP|S_IWGRP|S_IRGRP|S_IXUSR|S_IWUSR|0x100*/0x1ff);
// mount arguments: [
// src: nil
// dst: ptr[in, buffer] {
// buffer: {2e 2f 70 72 6f 63 00} (length 0x7)
// }
// type: ptr[in, buffer] {
// buffer: {70 72 6f 63 00} (length 0x5)
// }
// flags: mount_flags = 0x0 (4 bytes)
// data: nil
// ]
memcpy((void*)0x80000100, "./proc\000", 7);
memcpy((void*)0x800001c0, "proc\000", 5);
syscall(__NR_mount, /*src=*/0, /*dst=*/0x80000100, /*type=*/0x800001c0, /*flags=*/0, /*data=*/0);
// openat arguments: [
// fd: fd_dir (resource)
// file: ptr[in, buffer] {
// buffer: {2e 2f 70 72 6f 63 2f 73 79 73 2f 6e 65 74 2f 69 70 76 36 2f 63 6f 6e 66 2f 61 6c 6c 2f 6b 65 65 70 5f 61 64 64 72 5f 6f 6e 5f 64 6f 77 6e 00} (length 0x2f)
// }
// flags: open_flags = 0x1 (4 bytes)
// mode: open_mode = 0x0 (2 bytes)
// ]
// returns fd
memcpy((void*)0x80000240, "./proc/sys/net/ipv6/conf/all/keep_addr_on_down\000", 47);
res = syscall(__NR_openat, /*fd=*/0xffffff9c, /*file=*/0x80000240, /*flags=O_WRONLY*/1, /*mode=*/0);
if (res != -1)
r[1] = res;
// write arguments: [
// fd: fd (resource)
// buf: ptr[in, buffer] {
// buffer: {31 0a 00} (length 0x3)
// }
// count: len = 0x2 (4 bytes)
// ]
memcpy((void*)0x80000280, "1\n\000", 3);
syscall(__NR_write, /*fd=*/(intptr_t)r[1], /*buf=*/0x80000280, /*count=*/2);
// socket$nl_route arguments: [
// domain: const = 0x10 (4 bytes)
// type: const = 0x3 (4 bytes)
// proto: const = 0x0 (4 bytes)
// ]
// returns sock_nl_route
res = syscall(__NR_socket, /*domain=*/0x10, /*type=*/3, /*proto=*/0);
if (res != -1)
r[2] = res;
// ioctl$sock_SIOCGIFINDEX arguments: [
// fd: sock (resource)
// cmd: const = 0x8933 (4 bytes)
// arg: ptr[out, ifreq_dev_t[devnames, ifindex]] {
// ifreq_dev_t[devnames, ifindex] {
// ifr_ifrn: buffer: {6c 6f 00 00 00 00 00 00 00 00 00 00 00 00 00 00} (length 0x10)
// elem: ifindex (resource)
// pad = 0x0 (12 bytes)
// }
// }
// ]
memcpy((void*)0x800000c0, "lo\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 16);
res = syscall(__NR_ioctl, /*fd=*/(intptr_t)r[2], /*cmd=*/0x8933, /*arg=*/0x800000c0);
if (res != -1)
r[3] = *(uint32_t*)0x800000d0;
// sendmsg$nl_route arguments: [
// fd: sock_nl_route (resource)
// msg: ptr[in, msghdr_netlink[netlink_msg_route]] {
// msghdr_netlink[netlink_msg_route] {
// addr: nil
// addrlen: len = 0x0 (4 bytes)
// vec: ptr[in, iovec[in, netlink_msg_route]] {
// iovec[in, netlink_msg_route] {
// addr: ptr[inout, array[ANYUNION]] {
// array[ANYUNION] {
// union ANYUNION {
// ANYBLOB: buffer: {34 00 00 00 14 00 01 04 00 00 00 00 00 00 00 00 0a 40 00 00} (length 0x14)
// }
// union ANYUNION {
// ANYRES32: ANYRES32 (resource)
// }
// union ANYUNION {
// ANYBLOB: buffer: {14 00 01 00 20 01 00 00 00 00 00 00 00 00 00 00 00 00 00 fb c3 ef 54 ea 46 ad ee 6a 01} (length 0x1d)
// }
// }
// }
// len: len = 0x34 (4 bytes)
// }
// }
// vlen: const = 0x1 (4 bytes)
// ctrl: const = 0x0 (4 bytes)
// ctrllen: const = 0x0 (4 bytes)
// f: send_flags = 0x0 (4 bytes)
// }
// }
// f: send_flags = 0x0 (4 bytes)
// ]
*(uint32_t*)0x80000140 = 0;
*(uint32_t*)0x80000144 = 0;
*(uint32_t*)0x80000148 = 0x80000080;
*(uint32_t*)0x80000080 = 0x80000000;
memcpy((void*)0x80000000, "\x34\x00\x00\x00\x14\x00\x01\x04\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x40\x00\x00", 20);
*(uint32_t*)0x80000014 = r[3];
memcpy((void*)0x80000018, "\x14\x00\x01\x00\x20\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfb\xc3\xef\x54\xea\x46\xad\xee\x6a\x01", 29);
*(uint32_t*)0x80000084 = 0x34;
*(uint32_t*)0x8000014c = 1;
*(uint32_t*)0x80000150 = 0;
*(uint32_t*)0x80000154 = 0;
*(uint32_t*)0x80000158 = 0;
syscall(__NR_sendmsg, /*fd=*/(intptr_t)r[2], /*msg=*/0x80000140, /*f=*/0);
// socket$inet6 arguments: [
// domain: const = 0xa (4 bytes)
// type: socket_type = 0x2 (4 bytes)
// proto: int32 = 0x0 (4 bytes)
// ]
// returns sock_in6
res = syscall(__NR_socket, /*domain=*/0xa, /*type=SOCK_DGRAM*/2, /*proto=*/0);
if (res != -1)
r[4] = res;
// ioctl$sock_inet_SIOCSIFFLAGS arguments: [
// fd: sock (resource)
// cmd: const = 0x8914 (4 bytes)
// arg: ptr[in, ifreq_dev_t[devnames, flags[ifru_flags, int16]]] {
// ifreq_dev_t[devnames, flags[ifru_flags, int16]] {
// ifr_ifrn: buffer: {6c 6f 00 00 00 00 00 00 00 00 00 00 00 00 00 00} (length 0x10)
// elem: ifru_flags = 0x1 (2 bytes)
// pad = 0x0 (14 bytes)
// }
// }
// ]
memcpy((void*)0x80000200, "lo\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 16);
*(uint16_t*)0x80000210 = 1;
syscall(__NR_ioctl, /*fd=*/(intptr_t)r[4], /*cmd=*/0x8914, /*arg=*/0x80000200);
// ioctl$sock_inet_SIOCSIFFLAGS arguments: [
// fd: sock (resource)
// cmd: const = 0x8914 (4 bytes)
// arg: ptr[in, ifreq_dev_t[devnames, flags[ifru_flags, int16]]] {
// ifreq_dev_t[devnames, flags[ifru_flags, int16]] {
// ifr_ifrn: buffer: {6c 6f 00 00 00 00 00 00 00 00 00 00 00 00 00 00} (length 0x10)
// elem: ifru_flags = 0x0 (2 bytes)
// pad = 0x0 (14 bytes)
// }
// }
// ]
memcpy((void*)0x80000200, "lo\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 16);
*(uint16_t*)0x80000210 = 0;
syscall(__NR_ioctl, /*fd=*/(intptr_t)r[4], /*cmd=*/0x8914, /*arg=*/0x80000200);
return 0;
}
Reply: **Bug Analysis:**
The bug report highlights a warning message: `IPv6: BUG: Address 2001::fb on device lo is missing its host route.` This message is generated by a `pr_warn()` call in `__ipv6_ifa_notify()` located in `net/ipv6/addrconf.c`.
**Root Cause:**
The issue is a race condition involving IPv6 Duplicate Address Detection (DAD) and interface state changes when the `keep_addr_on_down` sysctl is enabled.
1. The reproducer sets `/proc/sys/net/ipv6/conf/all/keep_addr_on_down` to `1`.
2. It adds a permanent IPv6 address (`2001::fb`) to the loopback interface (`lo`) via a netlink `RTM_NEWADDR` message. This schedules DAD work (`addrconf_dad_work`).
3. It then toggles the `lo` interface state (UP then DOWN).
4. When the interface is brought DOWN, `addrconf_ifdown()` is invoked. Because `keep_addr_on_down` is enabled, the IPv6 address is kept, but its host route is removed (`ifa->rt = NULL`), and `addrconf_del_dad_work()` is called to cancel the pending DAD work.
5. However, `addrconf_del_dad_work()` uses `cancel_delayed_work()`, which does not synchronously wait for the work to finish if it is already executing.
6. If the DAD work is already running concurrently and completes, it calls `addrconf_dad_completed()`, which in turn calls `ipv6_ifa_notify(RTM_NEWADDR, ifp)`.
7. Inside `__ipv6_ifa_notify()`, the code checks if the interface is UP and if the route is missing. If the interface was quickly brought back UP (or due to the race), the condition `!ifp->rt && (ifp->idev->dev->flags & IFF_UP)` evaluates to true, triggering the `pr_warn()`.
**Security Dimensions:**
* **Exploitable: NO**
The bug is purely a logical race condition that results in a harmless `pr_warn()` message. There is no memory corruption, use-after-free, out-of-bounds access, uninitialized memory usage, or information leak. The kernel safely handles the missing route by skipping the route insertion and continuing execution normally.
* **Denial of Service: NO**
The warning does not halt the kernel, cause a panic, deadlock, or hang. It is a non-fatal warning (`pr_warn`, not `BUG()` or `panic()`) that merely logs the unexpected state. The system continues to operate normally.
* **Accessible From Unprivileged Processes: NO**
Triggering this bug requires modifying network interface flags (`SIOCSIFFLAGS`), adding an IPv6 address (`RTM_NEWADDR`), and writing to the `keep_addr_on_down` sysctl. All of these operations require `CAP_NET_ADMIN` privileges.
* **Accessible From User Namespaces: YES**
An unprivileged user can create a new user and network namespace (`CLONE_NEWUSER | CLONE_NEWNET`), gaining `CAP_NET_ADMIN` within that namespace. Inside the namespace, they can mount their own `/proc`, modify the `keep_addr_on_down` sysctl, configure the `lo` interface, and trigger the race condition.
* **VM Guest / VM Host / Network / Remote / Peripheral / Filesystem Triggers: NO**
The issue is strictly related to local network administration tasks (interface state toggling and address configuration) and cannot be triggered by external network traffic, guest/host interactions, peripherals, or malicious filesystems.
|
| 6/2 |
2026/09/21 00:57 |
llm |
expert |
0m
Model:
Tokens:
input: 12308
output: 24
thoughts: 48
Thoughts: Okay, here's my take on that bug report, walking through my thought process:
**Diving into this IPv6 Route Bug**
Alright, a kernel bug report has landed on my desk, and it's a doozy: "IPv6: BUG: Address 2001::fb on device lo is missing its host route." Immediately, my expert antennae go up. "Missing host route" is a classic IPv6 routing problem. The fact that it's on the loopback interface (`lo`) is interesting β loopback usually has a very specific and fundamental role, so any disruption there likely indicates a core issue. My first instinct? Let's trace back where this message comes from. Time to dig into the kernel source. I'll need to use the right tools to identify the exact code path responsible for printing this "BUG" message. Finding the source code will give me the most context about *why* the kernel thinks this is a critical problem and what conditions trigger it. The text itself is a great starting point for searching; I'll use that string as a guide.
|
| 7/2 |
2026/09/21 00:57 |
tool |
grepper |
0m
Args: map[Expression:Address .* on device .* is missing its host route]
Results: map[Output:net/ipv6/addrconf.c=6298=static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
--
net/ipv6/addrconf.c-6319- } else if (!ifp->rt && (ifp->idev->dev->flags & IFF_UP)) {
net/ipv6/addrconf.c:6320: pr_warn("BUG: Address %pI6c on device %s is missing its host route.\n",
net/ipv6/addrconf.c-6321- &ifp->addr, ifp->idev->dev->name);
]
|
| 8/2 |
2026/09/21 00:57 |
llm |
expert |
0m
Model:
Tokens:
input: 12777
output: 40
thoughts: 37
Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience:
**Analyzing the IPv6 Address Configuration Warning**
Alright, the alert originates within `__ipv6_ifa_notify`, specifically in `net/ipv6/addrconf.c`. My initial move is always to establish context, understand the surrounding code. I need to dive into `__ipv6_ifa_notify` and immediately see what's happening *around* the warning call. What conditions trigger it? What data is being passed in? Is this related to a specific kernel module or event? I'll probably be looking for a potential race condition or maybe an unexpected interaction between address assignment and interface state changes. Perhaps a misconfiguration is causing an incorrect notification, or a more serious flaw related to address configuration? I need to build a mental picture of the possible failure scenarios so I know how to test and diagnose it.
|
| 9/2 |
2026/09/21 00:57 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:__ipv6_ifa_notify]
Results: map[SourceCode:6298: static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
6299: {
6300: struct net *net = dev_net(ifp->idev->dev);
6301:
6302: if (event)
6303: ASSERT_RTNL();
6304:
6305: inet6_ifa_notify(event ? : RTM_NEWADDR, ifp);
6306:
6307: switch (event) {
6308: case RTM_NEWADDR:
6309: /*
6310: * If the address was optimistic we inserted the route at the
6311: * start of our DAD process, so we don't need to do it again.
6312: * If the device was taken down in the middle of the DAD
6313: * cycle there is a race where we could get here without a
6314: * host route, so nothing to insert. That will be fixed when
6315: * the device is brought up.
6316: */
6317: if (ifp->rt && !rcu_access_pointer(ifp->rt->fib6_node)) {
6318: ip6_ins_rt(net, ifp->rt);
6319: } else if (!ifp->rt && (ifp->idev->dev->flags & IFF_UP)) {
6320: pr_warn("BUG: Address %pI6c on device %s is missing its host route.\n",
6321: &ifp->addr, ifp->idev->dev->name);
6322: }
6323:
6324: if (ifp->idev->cnf.forwarding)
6325: addrconf_join_anycast(ifp);
6326: if (!ipv6_addr_any(&ifp->peer_addr))
6327: addrconf_prefix_route(&ifp->peer_addr, 128,
6328: ifp->rt_priority, ifp->idev->dev,
6329: 0, 0, GFP_ATOMIC);
6330: break;
6331: case RTM_DELADDR:
6332: if (ifp->idev->cnf.forwarding)
6333: addrconf_leave_anycast(ifp);
6334: addrconf_leave_solict(ifp->idev, &ifp->addr);
6335: if (!ipv6_addr_any(&ifp->peer_addr)) {
6336: struct fib6_info *rt;
6337:
6338: rt = addrconf_get_prefix_route(&ifp->peer_addr, 128,
6339: ifp->idev->dev, 0, 0,
6340: false);
6341: if (rt)
6342: ip6_del_rt(net, rt, false);
6343: }
6344: if (ifp->rt) {
6345: ip6_del_rt(net, ifp->rt, false);
6346: ifp->rt = NULL;
6347: }
6348: rt_genid_bump_ipv6(net);
6349: break;
6350: }
6351: atomic_inc(&net->ipv6.dev_addr_genid);
6352: }
SourceFile:net/ipv6/addrconf.c]
|
| 10/2 |
2026/09/21 00:57 |
llm |
expert |
0m
Model:
Tokens:
input: 14007
output: 38
thoughts: 504
Thoughts: **Analyzing a Non-Critical Kernel Warning**
Okay, so I've got this `pr_warn` message: "BUG: Address %pI6c on device %s is missing its host route." It's not a full-blown kernel crash, thank goodness, just a warning. We all know `pr_warn` isn't a kernel-killing `BUG()`, but I have to make sure there's no subtle DoS potential. The report specifies "IPv6: BUG: Address 2001::fb on device lo is missing its host route." Right, it's just a `printk`. No stack trace, which confirms it's a warning.
Wait a second, syzkaller flagged this as a bug because of the "BUG: " string. It's really just a warning message, it's not actually exploitable. It's just a `printk`. So, Does this cause denial of service? Okay, It's just printing a warning. Now, could it be triggered repeatedly and spam the logs? Log spam's not usually a severe DoS, unless it's a massive amount, which this doesn't seem to be.
But, syzkaller's heuristics are at play, considering "BUG: " a crash signature. Gotta dig deeper, always. Let's see the reproducer.
Alright, here's what it's doing: It's mounting procfs, enabling `keep_addr_on_down` for IPv6 on all interfaces, creating a netlink socket, getting the interface index for "lo," adding an IPv6 address (2001::fb) to "lo," then bringing "lo" up and down.
Aha! `keep_addr_on_down` is set to 1. When `keep_addr_on_down` is set, addresses are retained when an interface goes down. Now, that's interesting. So when "lo" goes down with `keep_addr_on_down` active, what happens to the host route? Time to check `addrconf_ifdown`.
|
| 11/2 |
2026/09/21 00:57 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addrconf_ifdown]
Results: map[SourceCode:3875: static int addrconf_ifdown(struct net_device *dev, bool unregister)
3876: {
3877: unsigned long event = unregister ? NETDEV_UNREGISTER : NETDEV_DOWN;
3878: struct net *net = dev_net(dev);
3879: struct inet6_dev *idev;
3880: struct inet6_ifaddr *ifa;
3881: LIST_HEAD(tmp_addr_list);
3882: bool keep_addr = false;
3883: bool was_ready;
3884: int state, i;
3885:
3886: ASSERT_RTNL();
3887:
3888: rt6_disable_ip(dev, event);
3889:
3890: idev = __in6_dev_get(dev);
3891: if (!idev)
3892: return -ENODEV;
3893:
3894: /*
3895: * Step 1: remove reference to ipv6 device from parent device.
3896: * Do not dev_put!
3897: */
3898: if (unregister) {
3899: WRITE_ONCE(idev->dead, 1);
3900:
3901: /* protected by rtnl_lock */
3902: RCU_INIT_POINTER(dev->ip6_ptr, NULL);
3903:
3904: /* Step 1.5: remove snmp6 entry */
3905: snmp6_unregister_dev(idev);
3906:
3907: }
3908:
3909: /* combine the user config with event to determine if permanent
3910: * addresses are to be removed from address hash table
3911: */
3912: if (!unregister && !idev->cnf.disable_ipv6) {
3913: /* aggregate the system setting and interface setting */
3914: int _keep_addr = READ_ONCE(net->ipv6.devconf_all->keep_addr_on_down);
3915:
3916: if (!_keep_addr)
3917: _keep_addr = READ_ONCE(idev->cnf.keep_addr_on_down);
3918:
3919: keep_addr = (_keep_addr > 0);
3920: }
3921:
3922: /* Step 2: clear hash table */
3923: for (i = 0; i < IN6_ADDR_HSIZE; i++) {
3924: struct hlist_head *h = &net->ipv6.inet6_addr_lst[i];
3925:
3926: spin_lock_bh(&net->ipv6.addrconf_hash_lock);
3927: restart:
3928: hlist_for_each_entry_rcu(ifa, h, addr_lst) {
3929: if (ifa->idev == idev) {
3930: addrconf_del_dad_work(ifa);
3931: /* combined flag + permanent flag decide if
3932: * address is retained on a down event
3933: */
3934: if (!keep_addr ||
3935: !(ifa->flags & IFA_F_PERMANENT) ||
3936: addr_is_local(&ifa->addr)) {
3937: hlist_del_init_rcu(&ifa->addr_lst);
3938: goto restart;
3939: }
3940: }
3941: }
3942: spin_unlock_bh(&net->ipv6.addrconf_hash_lock);
3943: }
3944:
3945: write_lock_bh(&idev->lock);
3946:
3947: addrconf_del_rs_timer(idev);
3948:
3949: /* Step 2: clear flags for stateless addrconf, repeated down
3950: * detection
3951: */
3952: was_ready = idev->if_flags & IF_READY;
3953: if (!unregister)
3954: idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD|IF_READY);
3955:
3956: /* Step 3: clear tempaddr list */
3957: while (!list_empty(&idev->tempaddr_list)) {
3958: ifa = list_first_entry(&idev->tempaddr_list,
3959: struct inet6_ifaddr, tmp_list);
3960: list_del(&ifa->tmp_list);
3961: write_unlock_bh(&idev->lock);
3962: spin_lock_bh(&ifa->lock);
3963:
3964: if (ifa->ifpub) {
3965: in6_ifa_put(ifa->ifpub);
3966: ifa->ifpub = NULL;
3967: }
3968: spin_unlock_bh(&ifa->lock);
3969: in6_ifa_put(ifa);
3970: write_lock_bh(&idev->lock);
3971: }
3972:
3973: list_for_each_entry(ifa, &idev->addr_list, if_list)
3974: list_add_tail(&ifa->if_list_aux, &tmp_addr_list);
3975: write_unlock_bh(&idev->lock);
3976:
3977: while (!list_empty(&tmp_addr_list)) {
3978: struct fib6_info *rt = NULL;
3979: bool keep;
3980:
3981: ifa = list_first_entry(&tmp_addr_list,
3982: struct inet6_ifaddr, if_list_aux);
3983: list_del(&ifa->if_list_aux);
3984:
3985: addrconf_del_dad_work(ifa);
3986:
3987: keep = keep_addr && (ifa->flags & IFA_F_PERMANENT) &&
3988: !addr_is_local(&ifa->addr);
3989:
3990: spin_lock_bh(&ifa->lock);
3991:
3992: if (keep) {
3993: /* set state to skip the notifier below */
3994: state = INET6_IFADDR_STATE_DEAD;
3995: ifa->state = INET6_IFADDR_STATE_PREDAD;
3996: if (!(ifa->flags & IFA_F_NODAD))
3997: ifa->flags |= IFA_F_TENTATIVE;
3998:
3999: rt = ifa->rt;
4000: ifa->rt = NULL;
4001: } else {
4002: state = ifa->state;
4003: ifa->state = INET6_IFADDR_STATE_DEAD;
4004: }
4005:
4006: spin_unlock_bh(&ifa->lock);
4007:
4008: if (rt)
4009: ip6_del_rt(net, rt, false);
4010:
4011: if (state != INET6_IFADDR_STATE_DEAD) {
4012: __ipv6_ifa_notify(RTM_DELADDR, ifa);
4013: inet6addr_notifier_call_chain(NETDEV_DOWN, ifa);
4014: } else {
4015: if (idev->cnf.forwarding)
4016: addrconf_leave_anycast(ifa);
4017: addrconf_leave_solict(ifa->idev, &ifa->addr);
4018: }
4019:
4020: if (!keep) {
4021: write_lock_bh(&idev->lock);
4022: list_del_rcu(&ifa->if_list);
4023: write_unlock_bh(&idev->lock);
4024: in6_ifa_put(ifa);
4025: }
4026: }
4027:
4028: /* Step 5: Discard anycast and multicast list */
4029: if (unregister) {
4030: ipv6_ac_destroy_dev(idev);
4031: ipv6_mc_destroy_dev(idev);
4032: } else if (was_ready) {
4033: ipv6_mc_down(idev);
4034: }
4035:
4036: WRITE_ONCE(idev->tstamp, jiffies);
4037: idev->ra_mtu = 0;
4038:
4039: /* Last: Shot the device (if unregistered) */
4040: if (unregister) {
4041: addrconf_sysctl_unregister(idev);
4042: neigh_parms_release(&nd_tbl, idev->nd_parms);
4043: neigh_ifdown(&nd_tbl, dev);
4044: in6_dev_put(idev);
4045: }
4046: return 0;
4047: }
SourceFile:net/ipv6/addrconf.c]
|
| 12/2 |
2026/09/21 00:57 |
llm |
expert |
0m
Model:
Tokens:
input: 17602
output: 37
thoughts: 223
Thoughts: **My Analysis of IPv6 Interface Down/Up Handling**
Okay, so I'm digging into how the IPv6 stack handles interface transitions, specifically the `addrconf_ifdown` function. I'm seeing that when `keep` is set to true within `addrconf_ifdown`, there's this bit of logic: the address state is moved to a "dead" state to skip notifications, the interface address's state is set to "predad", and if DAD (Duplicate Address Detection) isn't disabled, it's marked as "tentative". Crucially, the code then takes the existing route (`ifa->rt`) associated with the address and nulls it out, effectively setting `ifa->rt = NULL`. Then it deletes the host route (`ifa->rt`) using `ip6_del_rt`. So, it's explicitly deleting the host route associated with the interface address when `keep` is enabled.
My key question now is, what happens on the *way* back up? Does `addrconf_ifup` get called directly, or is it triggered through `addrconf_notify` with a `NETDEV_UP` event? I need to understand the exact order of events here. Let's see what `addrconf_notify` has to say.
|
| 13/2 |
2026/09/21 00:57 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addrconf_notify]
Results: map[SourceCode:3671: static int addrconf_notify(struct notifier_block *this, unsigned long event,
3672: void *ptr)
3673: {
3674: struct net_device *dev = netdev_notifier_info_to_dev(ptr);
3675: struct netdev_notifier_change_info *change_info;
3676: struct netdev_notifier_changeupper_info *info;
3677: struct inet6_dev *idev = __in6_dev_get(dev);
3678: struct net *net = dev_net(dev);
3679: int run_pending = 0;
3680: int err;
3681:
3682: switch (event) {
3683: case NETDEV_REGISTER:
3684: if (!idev && dev->mtu >= IPV6_MIN_MTU) {
3685: idev = ipv6_add_dev(dev);
3686: if (IS_ERR(idev))
3687: return notifier_from_errno(PTR_ERR(idev));
3688: }
3689: break;
3690:
3691: case NETDEV_CHANGEMTU:
3692: /* if MTU under IPV6_MIN_MTU stop IPv6 on this interface. */
3693: if (dev->mtu < IPV6_MIN_MTU) {
3694: addrconf_ifdown(dev, dev != net->loopback_dev);
3695: break;
3696: }
3697:
3698: if (idev) {
3699: rt6_mtu_change(dev, dev->mtu);
3700: WRITE_ONCE(idev->cnf.mtu6, dev->mtu);
3701: break;
3702: }
3703:
3704: /* allocate new idev */
3705: idev = ipv6_add_dev(dev);
3706: if (IS_ERR(idev))
3707: break;
3708:
3709: /* device is still not ready */
3710: if (!(idev->if_flags & IF_READY))
3711: break;
3712:
3713: run_pending = 1;
3714: fallthrough;
3715: case NETDEV_UP:
3716: case NETDEV_CHANGE:
3717: if (idev && idev->cnf.disable_ipv6)
3718: break;
3719:
3720: if (dev->priv_flags & IFF_NO_ADDRCONF) {
3721: if (event == NETDEV_UP && !IS_ERR_OR_NULL(idev) &&
3722: dev->flags & IFF_UP && dev->flags & IFF_MULTICAST)
3723: ipv6_mc_up(idev);
3724: break;
3725: }
3726:
3727: if (event == NETDEV_UP) {
3728: /* restore routes for permanent addresses */
3729: addrconf_permanent_addr(net, dev);
3730:
3731: if (!addrconf_link_ready(dev)) {
3732: /* device is not ready yet. */
3733: pr_debug("ADDRCONF(NETDEV_UP): %s: link is not ready\n",
3734: dev->name);
3735: break;
3736: }
3737:
3738: if (!idev && dev->mtu >= IPV6_MIN_MTU)
3739: idev = ipv6_add_dev(dev);
3740:
3741: if (!IS_ERR_OR_NULL(idev)) {
3742: idev->if_flags |= IF_READY;
3743: run_pending = 1;
3744: }
3745: } else if (event == NETDEV_CHANGE) {
3746: if (!addrconf_link_ready(dev)) {
3747: /* device is still not ready. */
3748: rt6_sync_down_dev(dev, event);
3749: break;
3750: }
3751:
3752: if (!IS_ERR_OR_NULL(idev)) {
3753: if (idev->if_flags & IF_READY) {
3754: /* device is already configured -
3755: * but resend MLD reports, we might
3756: * have roamed and need to update
3757: * multicast snooping switches
3758: */
3759: ipv6_mc_up(idev);
3760: change_info = ptr;
3761: if (change_info->flags_changed & IFF_NOARP)
3762: addrconf_dad_run(idev, true);
3763: rt6_sync_up(dev, RTNH_F_LINKDOWN);
3764: break;
3765: }
3766: idev->if_flags |= IF_READY;
3767: }
3768:
3769: pr_debug("ADDRCONF(NETDEV_CHANGE): %s: link becomes ready\n",
3770: dev->name);
3771:
3772: run_pending = 1;
3773: }
3774:
3775: addrconf_init_auto_addrs(dev);
3776:
3777: if (!IS_ERR_OR_NULL(idev)) {
3778: if (run_pending)
3779: addrconf_dad_run(idev, false);
3780:
3781: /* Device has an address by now */
3782: rt6_sync_up(dev, RTNH_F_DEAD);
3783:
3784: /*
3785: * If the MTU changed during the interface down,
3786: * when the interface up, the changed MTU must be
3787: * reflected in the idev as well as routers.
3788: */
3789: if (idev->cnf.mtu6 != dev->mtu &&
3790: dev->mtu >= IPV6_MIN_MTU) {
3791: rt6_mtu_change(dev, dev->mtu);
3792: WRITE_ONCE(idev->cnf.mtu6, dev->mtu);
3793: }
3794: WRITE_ONCE(idev->tstamp, jiffies);
3795: inet6_ifinfo_notify(RTM_NEWLINK, idev);
3796:
3797: /*
3798: * If the changed mtu during down is lower than
3799: * IPV6_MIN_MTU stop IPv6 on this interface.
3800: */
3801: if (dev->mtu < IPV6_MIN_MTU)
3802: addrconf_ifdown(dev, dev != net->loopback_dev);
3803: }
3804: break;
3805:
3806: case NETDEV_DOWN:
3807: case NETDEV_UNREGISTER:
3808: /*
3809: * Remove all addresses from this interface.
3810: */
3811: addrconf_ifdown(dev, event != NETDEV_DOWN);
3812: break;
3813:
3814: case NETDEV_CHANGENAME:
3815: if (idev) {
3816: snmp6_unregister_dev(idev);
3817: addrconf_sysctl_unregister(idev);
3818: err = addrconf_sysctl_register(idev);
3819: if (err)
3820: return notifier_from_errno(err);
3821: err = snmp6_register_dev(idev);
3822: if (err) {
3823: addrconf_sysctl_unregister(idev);
3824: return notifier_from_errno(err);
3825: }
3826: }
3827: break;
3828:
3829: case NETDEV_PRE_TYPE_CHANGE:
3830: case NETDEV_POST_TYPE_CHANGE:
3831: if (idev)
3832: addrconf_type_change(dev, event);
3833: break;
3834:
3835: case NETDEV_CHANGEUPPER:
3836: info = ptr;
3837:
3838: /* flush all routes if dev is linked to or unlinked from
3839: * an L3 master device (e.g., VRF)
3840: */
3841: if (info->upper_dev && netif_is_l3_master(info->upper_dev))
3842: addrconf_ifdown(dev, false);
3843: }
3844:
3845: return NOTIFY_OK;
3846: }
SourceFile:net/ipv6/addrconf.c]
|
| 14/2 |
2026/09/21 00:57 |
llm |
expert |
0m
Model:
Tokens:
input: 20706
output: 39
thoughts: 24
Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience, presented in the first person:
**My Brain on Network Device Initialization**
Alright, so the `NETDEV_UP` event firesβthat's the trigger. My initial thought process immediately connects that to `addrconf_permanent_addr(net, dev)`. That's where things get interesting, right? It's a key function in the process of bringing a network device online. It's the point where we're looking to configure its persistent addresses. That function call is like a flag being raised - a signal that we're moving from a generic "device is now present" state to a state where we're going to solidify and establish the permanent network configuration for it.
|
| 15/2 |
2026/09/21 00:57 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addrconf_permanent_addr]
Results: map[SourceCode:3637: static void addrconf_permanent_addr(struct net *net, struct net_device *dev)
3638: {
3639: struct inet6_ifaddr *ifp;
3640: LIST_HEAD(tmp_addr_list);
3641: struct inet6_dev *idev;
3642:
3643: /* Mutual exclusion with other if_list_aux users. */
3644: ASSERT_RTNL();
3645:
3646: idev = __in6_dev_get(dev);
3647: if (!idev)
3648: return;
3649:
3650: write_lock_bh(&idev->lock);
3651: list_for_each_entry(ifp, &idev->addr_list, if_list) {
3652: if (ifp->flags & IFA_F_PERMANENT)
3653: list_add_tail(&ifp->if_list_aux, &tmp_addr_list);
3654: }
3655: write_unlock_bh(&idev->lock);
3656:
3657: while (!list_empty(&tmp_addr_list)) {
3658: ifp = list_first_entry(&tmp_addr_list,
3659: struct inet6_ifaddr, if_list_aux);
3660: list_del(&ifp->if_list_aux);
3661:
3662: if (fixup_permanent_addr(net, idev, ifp) < 0) {
3663: net_info_ratelimited("%s: Failed to add prefix route for address %pI6c; dropping\n",
3664: idev->dev->name, &ifp->addr);
3665: in6_ifa_hold(ifp);
3666: ipv6_del_addr(ifp);
3667: }
3668: }
3669: }
SourceFile:net/ipv6/addrconf.c]
|
| 16/2 |
2026/09/21 00:57 |
llm |
expert |
0m
Model:
Tokens:
input: 21501
output: 39
thoughts: 11
Thoughts: Okay, here's my interpretation of that thought process, assuming I'm an expert in this field, and rendered in the first person:
**Analyzing the Call to fixup_permanent_addr**
Right, so `fixup_permanent_addr` has been triggered. My first thought is: "Okay, what's being *permanently* addressed here?" Given the naming convention, I immediately assume this is related to memory management, specifically dealing with relocating or resolving a specific address. The term "permanent" is crucial. It implies this isn't a temporary fix or a placeholder; it's a final, stable resolution.
I need more context, obviously. Where is this function called from? What's the surrounding code doing? Knowing the calling code is vital in understanding the `fixup_permanent_addr` function and its impact. Is this happening during initialization, relocation, or runtime? What kind of data or structure does it affect? Is this operating system related? Is it kernel related? Is it user space?
My mind is now racing through possible scenarios. Is this a physical to virtual address mapping being finalized? Perhaps it's dealing with a relocated library, and the symbol table needs to be updated? Is it dealing with something related to memory protection and ensuring an address is correctly marked as read-only or executable? Or maybe it's the final stage in resolving a self-relocating piece of code? The implications are far-reaching. I have to trace back what happened before this function call to fully grasp the situation.
Ultimately, I know this is a critical step. A misstep here could lead to crashes, memory corruption, or security vulnerabilities. So, this warrants careful examination. I need to dive deeper into the code and thoroughly understand the 'why' and 'how' behind this function call.
|
| 17/2 |
2026/09/21 00:57 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:fixup_permanent_addr]
Results: map[SourceCode:3600: static int fixup_permanent_addr(struct net *net,
3601: struct inet6_dev *idev,
3602: struct inet6_ifaddr *ifp)
3603: {
3604: /* !fib6_node means the host route was removed from the
3605: * FIB, for example, if 'lo' device is taken down. In that
3606: * case regenerate the host route.
3607: */
3608: if (!ifp->rt || !ifp->rt->fib6_node) {
3609: struct fib6_info *f6i, *prev;
3610:
3611: f6i = addrconf_f6i_alloc(net, idev, &ifp->addr, false,
3612: GFP_KERNEL, NULL);
3613: if (IS_ERR(f6i))
3614: return PTR_ERR(f6i);
3615:
3616: /* ifp->rt can be accessed outside of rtnl */
3617: spin_lock_bh(&ifp->lock);
3618: prev = ifp->rt;
3619: ifp->rt = f6i;
3620: spin_unlock_bh(&ifp->lock);
3621:
3622: fib6_info_release(prev);
3623: }
3624:
3625: if (!(ifp->flags & IFA_F_NOPREFIXROUTE)) {
3626: addrconf_prefix_route(&ifp->addr, ifp->prefix_len,
3627: ifp->rt_priority, idev->dev, 0, 0,
3628: GFP_KERNEL);
3629: }
3630:
3631: if (ifp->state == INET6_IFADDR_STATE_PREDAD)
3632: addrconf_dad_start(ifp);
3633:
3634: return 0;
3635: }
SourceFile:net/ipv6/addrconf.c]
|
| 18/2 |
2026/09/21 00:57 |
llm |
expert |
0m
Model:
Tokens:
input: 22526
output: 39
thoughts: 111
Thoughts: **My Analysis of `fixup_permanent_addr`'s Logic**
Okay, let's break down this `fixup_permanent_addr` function. It seems to be addressing a specific scenario, likely around network interface configuration and IPv6 addresses. My initial understanding is that it checks for a couple of key conditions. First, it's examining `ifp->rt`. This is interesting; I'm betting that `ifp->rt` refers to the route associated with a network interface (`ifp`). The check `!ifp->rt || !ifp->rt->fib6_node` indicates it's looking for either a missing route entirely (`ifp->rt` is NULL) or a route without a corresponding FIB (Forwarding Information Base) node, specifically for IPv6.
The interesting part is that if `ifp->rt` is NULL β which I now see is a direct consequence of `addrconf_ifdown` setting it to NULL β then *it allocates a new host route*. So, the system is dynamically creating a new host route to resolve the fact that it's just been brought down. It then sets `ifp->rt` to `f6i`, I'm assuming that `f6i` is the freshly allocated route.
And finally, if the interface is in the `INET6_IFADDR_STATE_PREDAD` state, it kicks off `addrconf_dad_start(ifp)`. That tells me this is all tied into IPv6 Duplicate Address Detection (DAD). So, the entire logic here is essentially a DAD re-initiation strategy if an interface goes down then back up with a persistent IPv6 address configured. Pretty clever! This is designed to gracefully handle transient network events and maintain IPv6 connectivity.
|
| 19/2 |
2026/09/21 00:57 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addrconf_dad_start]
Results: map[SourceCode:4196: static void addrconf_dad_start(struct inet6_ifaddr *ifp)
4197: {
4198: bool begin_dad = false;
4199:
4200: spin_lock_bh(&ifp->lock);
4201: if (ifp->state != INET6_IFADDR_STATE_DEAD) {
4202: ifp->state = INET6_IFADDR_STATE_PREDAD;
4203: begin_dad = true;
4204: }
4205: spin_unlock_bh(&ifp->lock);
4206:
4207: if (begin_dad)
4208: addrconf_mod_dad_work(ifp, 0);
4209: }
SourceFile:net/ipv6/addrconf.c]
|
| 20/2 |
2026/09/21 00:57 |
llm |
expert |
0m
Model:
Tokens:
input: 23295
output: 39
thoughts: 17
Thoughts: Here's a summary of my understanding, rendered as if these are my own thoughts:
**Address Conflict Detection Workflow**
Okay, so looking at this, `addrconf_dad_start` is essentially the initiator. It's the function that kicks off the Address Conflict Detection (DAD) process. And what does it do? It queues up `addrconf_dad_work`. That's the core. The *starting* function places the *work* function on a queue. So, this tells me that the DAD process isn't running synchronously. `addrconf_dad_start` sets things in motion, but the actual conflict detection logic, the nitty-gritty of checking for duplicate addresses, isn't happening immediately. It's deferred, probably handled by some background task or worker thread. Makes sense. It's a clean way to manage the asynchronous nature of network operations, especially when you consider potential delays in network communication, collisions and address management. This could be part of an interrupt routine or triggered by a change in state. This looks like a solid design, a standard event-driven approach. Now I need to know where `addrconf_dad_work` is defined and what it is actually doing!
|
| 21/2 |
2026/09/21 00:57 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addrconf_dad_work]
Results: map[SourceCode:4211: static void addrconf_dad_work(struct work_struct *w)
4212: {
4213: struct inet6_ifaddr *ifp = container_of(to_delayed_work(w),
4214: struct inet6_ifaddr,
4215: dad_work);
4216: struct inet6_dev *idev = ifp->idev;
4217: bool bump_id, disable_ipv6 = false;
4218: struct in6_addr mcaddr;
4219: struct net *net;
4220:
4221: enum {
4222: DAD_PROCESS,
4223: DAD_BEGIN,
4224: DAD_ABORT,
4225: } action = DAD_PROCESS;
4226:
4227: net = dev_net(idev->dev);
4228:
4229: rtnl_net_lock(net);
4230:
4231: spin_lock_bh(&ifp->lock);
4232: if (ifp->state == INET6_IFADDR_STATE_PREDAD) {
4233: action = DAD_BEGIN;
4234: ifp->state = INET6_IFADDR_STATE_DAD;
4235: } else if (ifp->state == INET6_IFADDR_STATE_ERRDAD) {
4236: action = DAD_ABORT;
4237: ifp->state = INET6_IFADDR_STATE_POSTDAD;
4238:
4239: if ((READ_ONCE(net->ipv6.devconf_all->accept_dad) > 1 ||
4240: READ_ONCE(idev->cnf.accept_dad) > 1) &&
4241: !idev->cnf.disable_ipv6 &&
4242: !(ifp->flags & IFA_F_STABLE_PRIVACY)) {
4243: struct in6_addr addr;
4244:
4245: addr.s6_addr32[0] = htonl(0xfe800000);
4246: addr.s6_addr32[1] = 0;
4247:
4248: if (!ipv6_generate_eui64(addr.s6_addr + 8, idev->dev) &&
4249: ipv6_addr_equal(&ifp->addr, &addr)) {
4250: /* DAD failed for link-local based on MAC */
4251: WRITE_ONCE(idev->cnf.disable_ipv6, 1);
4252:
4253: pr_info("%s: IPv6 being disabled!\n",
4254: ifp->idev->dev->name);
4255: disable_ipv6 = true;
4256: }
4257: }
4258: }
4259: spin_unlock_bh(&ifp->lock);
4260:
4261: if (action == DAD_BEGIN) {
4262: addrconf_dad_begin(ifp);
4263: goto out;
4264: } else if (action == DAD_ABORT) {
4265: in6_ifa_hold(ifp);
4266: addrconf_dad_stop(ifp, 1);
4267: if (disable_ipv6)
4268: addrconf_ifdown(idev->dev, false);
4269: goto out;
4270: }
4271:
4272: if (!ifp->dad_probes && addrconf_dad_end(ifp))
4273: goto out;
4274:
4275: write_lock_bh(&idev->lock);
4276: if (idev->dead || !(idev->if_flags & IF_READY)) {
4277: write_unlock_bh(&idev->lock);
4278: goto out;
4279: }
4280:
4281: spin_lock(&ifp->lock);
4282: if (ifp->state == INET6_IFADDR_STATE_DEAD) {
4283: spin_unlock(&ifp->lock);
4284: write_unlock_bh(&idev->lock);
4285: goto out;
4286: }
4287:
4288: if (ifp->dad_probes == 0) {
4289: bool send_na = false;
4290:
4291: /*
4292: * DAD was successful
4293: */
4294:
4295: if (ifp->flags & IFA_F_TENTATIVE &&
4296: !(ifp->flags & IFA_F_OPTIMISTIC))
4297: send_na = true;
4298: bump_id = ifp->flags & IFA_F_TENTATIVE;
4299: ifp->flags &= ~(IFA_F_TENTATIVE|IFA_F_OPTIMISTIC|IFA_F_DADFAILED);
4300: spin_unlock(&ifp->lock);
4301: write_unlock_bh(&idev->lock);
4302:
4303: addrconf_dad_completed(ifp, bump_id, send_na);
4304:
4305: goto out;
4306: }
4307:
4308: ifp->dad_probes--;
4309: addrconf_mod_dad_work(ifp,
4310: max(NEIGH_VAR(ifp->idev->nd_parms, RETRANS_TIME),
4311: HZ/100));
4312: spin_unlock(&ifp->lock);
4313: write_unlock_bh(&idev->lock);
4314:
4315: /* send a neighbour solicitation for our addr */
4316: addrconf_addr_solict_mult(&ifp->addr, &mcaddr);
4317: ndisc_send_ns(ifp->idev->dev, &ifp->addr, &mcaddr, &in6addr_any,
4318: ifp->dad_nonce);
4319: out:
4320: in6_ifa_put(ifp);
4321: rtnl_net_unlock(net);
4322: }
SourceFile:net/ipv6/addrconf.c]
|
| 22/2 |
2026/09/21 00:57 |
llm |
expert |
0m
Model:
Tokens:
input: 25400
output: 39
thoughts: 33
Thoughts: Okay, here's my interpretation of those thoughts, summarized from my perspective as someone well-versed in this networking domain:
**My Perspective on the `addrconf_dad_work` Completion**
Right, so, as I understand it, the whole Duplicate Address Detection (`DAD`) process within the address configuration context wraps up at the function `addrconf_dad_work`. I need to ensure that when it does complete, it properly calls the `addrconf_dad_completed` routine. This is critical for the DAD process, as `addrconf_dad_completed` is the function that actually finalizes the DAD process. I'm noting that the arguments provided to this function are `ifp`, `bump_id`, and `send_na`. These will be essential for identifying the interface, tracking the specific DAD attempt, and specifying if a Neighbor Advertisement needs to be sent or not. Essentially, this function is the call that initiates the actions based on the DAD test results.
|
| 23/2 |
2026/09/21 00:58 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addrconf_dad_completed]
Results: map[SourceCode:4342: static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id,
4343: bool send_na)
4344: {
4345: struct net_device *dev = ifp->idev->dev;
4346: struct in6_addr lladdr;
4347: bool send_rs, send_mld;
4348:
4349: addrconf_del_dad_work(ifp);
4350:
4351: /*
4352: * Configure the address for reception. Now it is valid.
4353: */
4354:
4355: ipv6_ifa_notify(RTM_NEWADDR, ifp);
4356:
4357: /* If added prefix is link local and we are prepared to process
4358: router advertisements, start sending router solicitations.
4359: */
4360:
4361: read_lock_bh(&ifp->idev->lock);
4362: send_mld = ifp->scope == IFA_LINK && ipv6_lonely_lladdr(ifp);
4363: send_rs = send_mld &&
4364: ipv6_accept_ra(ifp->idev) &&
4365: READ_ONCE(ifp->idev->cnf.rtr_solicits) != 0 &&
4366: (dev->flags & IFF_LOOPBACK) == 0 &&
4367: (dev->type != ARPHRD_TUNNEL) &&
4368: !netif_is_team_port(dev);
4369: read_unlock_bh(&ifp->idev->lock);
4370:
4371: /* While dad is in progress mld report's source address is in6_addrany.
4372: * Resend with proper ll now.
4373: */
4374: if (send_mld)
4375: ipv6_mc_dad_complete(ifp->idev);
4376:
4377: /* send unsolicited NA if enabled */
4378: if (send_na &&
4379: (READ_ONCE(ifp->idev->cnf.ndisc_notify) ||
4380: READ_ONCE(dev_net(dev)->ipv6.devconf_all->ndisc_notify))) {
4381: ndisc_send_na(dev, &in6addr_linklocal_allnodes, &ifp->addr,
4382: /*router=*/ !!ifp->idev->cnf.forwarding,
4383: /*solicited=*/ false, /*override=*/ true,
4384: /*inc_opt=*/ true);
4385: }
4386:
4387: if (send_rs) {
4388: /*
4389: * If a host as already performed a random delay
4390: * [...] as part of DAD [...] there is no need
4391: * to delay again before sending the first RS
4392: */
4393: if (ipv6_get_lladdr(dev, &lladdr, IFA_F_TENTATIVE))
4394: return;
4395: ndisc_send_rs(dev, &lladdr, &in6addr_linklocal_allrouters);
4396:
4397: write_lock_bh(&ifp->idev->lock);
4398: spin_lock(&ifp->lock);
4399: ifp->idev->rs_interval = rfc3315_s14_backoff_init(
4400: READ_ONCE(ifp->idev->cnf.rtr_solicit_interval));
4401: ifp->idev->rs_probes = 1;
4402: ifp->idev->if_flags |= IF_RS_SENT;
4403: addrconf_mod_rs_timer(ifp->idev, ifp->idev->rs_interval);
4404: spin_unlock(&ifp->lock);
4405: write_unlock_bh(&ifp->idev->lock);
4406: }
4407:
4408: if (bump_id)
4409: rt_genid_bump_ipv6(dev_net(dev));
4410:
4411: /* Make sure that a new temporary address will be created
4412: * before this temporary address becomes deprecated.
4413: */
4414: if (ifp->flags & IFA_F_TEMPORARY)
4415: addrconf_verify_rtnl(dev_net(dev));
4416: }
SourceFile:net/ipv6/addrconf.c]
|
| 24/2 |
2026/09/21 00:58 |
llm |
expert |
0m
Model:
Tokens:
input: 26989
output: 39
thoughts: 47
Thoughts: Here's my take on the process, considering my expertise:
**My Perspective on the IPv6 Address Notification**
Okay, so I see `ipv6_ifa_notify(RTM_NEWADDR, ifp)` getting called. That's the entry point for handling new IPv6 address events, specifically when a new address is added to an interface, `ifp`. The system is basically saying, "Hey, there's a new IPv6 address I need you to know about."
My immediate thought is, 'Where does this actually *do* something?' The name `ipv6_ifa_notify` suggests a notification function, but it's probably just a wrapper. I'm betting this function is calling another function to actually process the new address. Likely `__ipv6_ifa_notify` or something similar, and the double underscore prefix often hints at an internal, non-public function. I need to dive in and see where the heavy lifting is actually happening. Itβs critical I understand the notification flow to make sure everything is working as designed. I have to trace how this event impacts the routing tables, neighbor discovery, and other dependent systems. This isnβt a one-off call, itβs part of a broader system-wide reaction. Time to dig deeper into the code to confirm my assumptions and grasp the full implications.
|
| 25/2 |
2026/09/21 00:58 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:ipv6_ifa_notify]
Results: map[SourceCode:6354: static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
6355: {
6356: if (likely(ifp->idev->dead == 0))
6357: __ipv6_ifa_notify(event, ifp);
6358: }
SourceFile:net/ipv6/addrconf.c]
|
| 26/2 |
2026/09/21 00:58 |
llm |
expert |
0m
Model:
Tokens:
input: 27476
output: 38
thoughts: 2848
Thoughts: **Analyzing a Potential IPv6 Host Route Issue**
Okay, so I see that `__ipv6_ifa_notify` is called, and inside this function there's a check that seems relevant: it checks if a host route (`ifp->rt`) exists for an IPv6 address after a new address is added (`RTM_NEWADDR`). If the route is missing and the interface is up, a warning is printed. This immediately grabs my attention. I know the IPv6 stack well enough to see a potential problem area.
I start thinking about the conditions under which this `ifp->rt` could be NULL when the device is up. I know that `addrconf_ifdown` sets `ifp->rt` to NULL if the `keep` variable is set to true. `keep` depends on the `keep_addr_on_down` flag being set and the `IFA_F_PERMANENT` flag being set in the address's flags. Crucially, it must *not* be a local address.
My immediate question: when the device comes back up, shouldn't `ifp->rt` be restored? I recall that `addrconf_notify(NETDEV_UP)` calls `addrconf_permanent_addr`, which should call `fixup_permanent_addr`. This routine allocates a new `f6i` (IPv6 FIB entry) and assigns it to `ifp->rt`. Then `addrconf_dad_start` is called, queuing `addrconf_dad_work`. This should be sufficient. After DAD completes, `addrconf_dad_completed` triggers `ipv6_ifa_notify(RTM_NEWADDR, ifp)`. Since the route should have been created by `fixup_permanent_addr`, it should not be null.
But, if the address is *not* permanent (`IFA_F_PERMANENT` isn't set), then `fixup_permanent_addr` is *not* called. Now I see that, `addrconf_permanent_addr` iterates over `idev->addr_list`. It calls `fixup_permanent_addr` for *each* address. It's the permanent flag that's the key.
Now I think, what if DAD completes *before* `addrconf_permanent_addr` is run? But `addrconf_dad_work` is queued by `addrconf_dad_start`, which is called by `fixup_permanent_addr`. That order seems fixed. The DAD work cannot run before the route is setup, so `ifp->rt` is not null during DAD work.
The only way I can see this happening is if `addrconf_dad_work` had been *already* queued and running when the interface went down. In that case, `addrconf_ifdown` calls `addrconf_del_dad_work` to cancel the work, but there might be a race.
I look at the reproducer provided. First, `keep_addr_on_down` is set to 1. Then a new IPv6 address (`2001::fb`) with `IFA_F_NODAD` is added to the loopback interface (`lo`). The address has been added via netlink. I know that by default addresses added via netlink are `IFA_F_PERMANENT`. The loopback is set up and down via `ioctl` calls. Setting the interface down calls `addrconf_ifdown`. Because `keep_addr_on_down` is 1 and the interface goes down, the value `ifp->rt` is set to NULL, and the interface is in `INET6_IFADDR_STATE_PREDAD`.
Now, if the `addr_is_local` routine is implemented properly, then for a loopback address it *should* return true. This means the host route, `ifp->rt`, would *not* be preserved, and the warning I was analyzing should not be printed, as the problem is with non-local addresses. My current hypothesis is that the root cause of the warning is an improper implementation in `addr_is_local` for loopback addresses.
|
| 27/2 |
2026/09/21 00:58 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addr_is_local]
Results: map[SourceCode:3869: static bool addr_is_local(const struct in6_addr *addr)
3870: {
3871: return ipv6_addr_type(addr) &
3872: (IPV6_ADDR_LINKLOCAL | IPV6_ADDR_LOOPBACK);
3873: }
SourceFile:net/ipv6/addrconf.c]
|
| 28/2 |
2026/09/21 00:58 |
llm |
expert |
0m
Model:
Tokens:
input: 31371
output: 39
thoughts: 408
Thoughts: **My Analysis of the IPv6 Address Issue**
Okay, let's break this down. `2001::fb` isn't a link-local or loopback address, so `addr_is_local` is false, and therefore, we're keeping it. I see that `ifp->rt` is being set to NULL, and the `ifa->state` is set to `INET6_IFADDR_STATE_PREDAD`. Then, the reproducer just exits. That's odd. When the reproducer exits, the network namespace is destroyed, and typically, `lo` is unregistered. Or, did it bring `lo` back up? Ah, yes, the reproducer sets `lo` UP, then DOWN.
Now, the important part: where does the warning occur? It's when `__ipv6_ifa_notify(RTM_NEWADDR)` is called, and *crucially* `ifp->rt` is NULL while `dev->flags & IFF_UP` is true. But that's a problem. I thought we just set it DOWN! How can the interface be considered UP? The reproducer is single-threaded, so *maybe* there's a race condition from syzkaller or something else. I can't rule that out.
But wait, if `lo` is set DOWN, `ifp->rt` *should* be NULL, right? Then, if `lo` is set UP again, `addrconf_notify(NETDEV_UP)` is called. That leads to `addrconf_permanent_addr`, which invokes `fixup_permanent_addr`. *That's* where it gets interesting: `fixup_permanent_addr` allocates a *new* `rt` and sets `ifp->rt = f6i`. Then, `addrconf_dad_start(ifp)` is called. This queues the `addrconf_dad_work` work item.
Finally, `addrconf_dad_work` runs. Now, since this is the loopback interface, could `IFA_F_NODAD` be involved? I need to check `inet6_addr_add` to be sure.
|
| 29/2 |
2026/09/21 00:58 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:inet6_addr_add]
Results: map[SourceCode:3033: /*
3034: * Manual configuration of address on an interface
3035: */
3036: static int inet6_addr_add(struct net *net, struct net_device *dev,
3037: struct ifa6_config *cfg, clock_t expires, u32 flags,
3038: struct netlink_ext_ack *extack)
3039: {
3040: struct inet6_ifaddr *ifp;
3041: struct inet6_dev *idev;
3042:
3043: ASSERT_RTNL_NET(net);
3044:
3045: if (cfg->plen > 128) {
3046: NL_SET_ERR_MSG_MOD(extack, "Invalid prefix length");
3047: return -EINVAL;
3048: }
3049:
3050: if (cfg->ifa_flags & IFA_F_MANAGETEMPADDR && cfg->plen != 64) {
3051: NL_SET_ERR_MSG_MOD(extack, "address with \"mngtmpaddr\" flag must have a prefix length of 64");
3052: return -EINVAL;
3053: }
3054:
3055: idev = addrconf_add_dev(dev);
3056: if (IS_ERR(idev)) {
3057: NL_SET_ERR_MSG_MOD(extack, "IPv6 is disabled on this device");
3058: return PTR_ERR(idev);
3059: }
3060:
3061: if (cfg->ifa_flags & IFA_F_MCAUTOJOIN) {
3062: int ret = ipv6_mc_config(net->ipv6.mc_autojoin_sk,
3063: true, cfg->pfx, dev->ifindex);
3064:
3065: if (ret < 0) {
3066: NL_SET_ERR_MSG_MOD(extack, "Multicast auto join failed");
3067: return ret;
3068: }
3069: }
3070:
3071: cfg->scope = ipv6_addr_scope(cfg->pfx);
3072:
3073: ifp = ipv6_add_addr(idev, cfg, true, extack);
3074: if (!IS_ERR(ifp)) {
3075: if (!(cfg->ifa_flags & IFA_F_NOPREFIXROUTE)) {
3076: addrconf_prefix_route(&ifp->addr, ifp->prefix_len,
3077: ifp->rt_priority, dev, expires,
3078: flags, GFP_KERNEL);
3079: }
3080:
3081: /* Send a netlink notification if DAD is enabled and
3082: * optimistic flag is not set
3083: */
3084: if (!(ifp->flags & (IFA_F_OPTIMISTIC | IFA_F_NODAD)))
3085: ipv6_ifa_notify(0, ifp);
3086: /*
3087: * Note that section 3.1 of RFC 4429 indicates
3088: * that the Optimistic flag should not be set for
3089: * manually configured addresses
3090: */
3091: addrconf_dad_start(ifp);
3092: if (cfg->ifa_flags & IFA_F_MANAGETEMPADDR)
3093: manage_tempaddrs(idev, ifp, cfg->valid_lft,
3094: cfg->preferred_lft, true, jiffies);
3095: in6_ifa_put(ifp);
3096: addrconf_verify_rtnl(net);
3097: return 0;
3098: } else if (cfg->ifa_flags & IFA_F_MCAUTOJOIN) {
3099: ipv6_mc_config(net->ipv6.mc_autojoin_sk, false,
3100: cfg->pfx, dev->ifindex);
3101: }
3102:
3103: return PTR_ERR(ifp);
3104: }
SourceFile:net/ipv6/addrconf.c]
|
| 30/2 |
2026/09/21 00:58 |
llm |
expert |
0m
Model:
Tokens:
input: 33489
output: 39
thoughts: 60
Thoughts: **Loopback Device Conundrum**
Okay, so if `lo`, the loopback device, gets set to "UP," the system calls `addrconf_notify(NETDEV_UP)`. Makes sense, in theory. But wait a second... it's `lo`, the loopback. Do we even *do* DAD (Duplicate Address Detection) checks on loopback devices? I need to remember that `addrconf_dad_work` is where things would begin. If it doesn't, that raises questions about how the process deals with `addrconf_dad_begin`.
|
| 31/2 |
2026/09/21 00:58 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addrconf_dad_begin]
Results: map[SourceCode:4127: static void addrconf_dad_begin(struct inet6_ifaddr *ifp)
4128: {
4129: struct inet6_dev *idev = ifp->idev;
4130: struct net_device *dev = idev->dev;
4131: bool bump_id, notify = false;
4132: struct net *net;
4133:
4134: addrconf_join_solict(dev, &ifp->addr);
4135:
4136: read_lock_bh(&idev->lock);
4137: spin_lock(&ifp->lock);
4138: if (ifp->state == INET6_IFADDR_STATE_DEAD)
4139: goto out;
4140:
4141: net = dev_net(dev);
4142: if (dev->flags&(IFF_NOARP|IFF_LOOPBACK) ||
4143: (READ_ONCE(net->ipv6.devconf_all->accept_dad) < 1 &&
4144: READ_ONCE(idev->cnf.accept_dad) < 1) ||
4145: !(ifp->flags&IFA_F_TENTATIVE) ||
4146: ifp->flags & IFA_F_NODAD) {
4147: bool send_na = false;
4148:
4149: if (ifp->flags & IFA_F_TENTATIVE &&
4150: !(ifp->flags & IFA_F_OPTIMISTIC))
4151: send_na = true;
4152: bump_id = ifp->flags & IFA_F_TENTATIVE;
4153: ifp->flags &= ~(IFA_F_TENTATIVE|IFA_F_OPTIMISTIC|IFA_F_DADFAILED);
4154: spin_unlock(&ifp->lock);
4155: read_unlock_bh(&idev->lock);
4156:
4157: addrconf_dad_completed(ifp, bump_id, send_na);
4158: return;
4159: }
4160:
4161: if (!(idev->if_flags & IF_READY)) {
4162: spin_unlock(&ifp->lock);
4163: read_unlock_bh(&idev->lock);
4164: /*
4165: * If the device is not ready:
4166: * - keep it tentative if it is a permanent address.
4167: * - otherwise, kill it.
4168: */
4169: in6_ifa_hold(ifp);
4170: addrconf_dad_stop(ifp, 0);
4171: return;
4172: }
4173:
4174: /*
4175: * Optimistic nodes can start receiving
4176: * Frames right away
4177: */
4178: if (ifp->flags & IFA_F_OPTIMISTIC) {
4179: ip6_ins_rt(net, ifp->rt);
4180: if (ipv6_use_optimistic_addr(net, idev)) {
4181: /* Because optimistic nodes can use this address,
4182: * notify listeners. If DAD fails, RTM_DELADDR is sent.
4183: */
4184: notify = true;
4185: }
4186: }
4187:
4188: addrconf_dad_kick(ifp);
4189: out:
4190: spin_unlock(&ifp->lock);
4191: read_unlock_bh(&idev->lock);
4192: if (notify)
4193: ipv6_ifa_notify(RTM_NEWADDR, ifp);
4194: }
SourceFile:net/ipv6/addrconf.c]
|
| 32/2 |
2026/09/21 00:58 |
llm |
expert |
0m
Model:
Tokens:
input: 34798
output: 39
thoughts: 868
Thoughts: **Analyzing IPv6 Address Configuration on the Loopback Interface**
Okay, let's break this down. My initial thought is focused on the loopback interface (`lo`) and its IPv6 address configuration process. Specifically, I'm tracing the path from the interface coming up to address assignment. The code snippet in `addrconf_dad_begin` is central here.
It's clear that if the loopback interface is up (`IFF_LOOPBACK` is set in `dev->flags`), the DAD (Duplicate Address Detection) process is bypassed, and we jump directly to `addrconf_dad_completed`. That function, crucially, calls `ipv6_ifa_notify(RTM_NEWADDR, ifp)`. That is the notification, but when is it happening?
I'm now tracing the execution flow back to `addrconf_dad_begin`, which is called from `addrconf_dad_work`. This work is queued by `addrconf_dad_start`. Makes sense. When `lo` comes up (`NETDEV_UP`), `addrconf_notify` gets called, leading to `addrconf_permanent_addr` which in turn calls `fixup_permanent_addr`. This `fixup_permanent_addr` function is important; it sets `ifp->rt = f6i`, and *then* calls `addrconf_dad_start`. Thus `ifp->rt` should *not* be NULL when `addrconf_dad_completed` calls `ipv6_ifa_notify`.
But what if `ifp->rt` *is* NULL? Aha! That's when I have to look at `fixup_permanent_addr`'s failure conditions. If `addrconf_f6i_alloc` fails, `fixup_permanent_addr` returns an error, meaning route allocation failed, and it handles the error path. If this happens, `addrconf_permanent_addr` *deletes* the address, so it's impossible that `addrconf_dad_start` is ever called! So, that's not the problem.
Now, I need to consider a different scenario. What if `addrconf_dad_work` *isn't* queued by `fixup_permanent_addr` at all? Perhaps it is called from another part of the system? Let's trace from the beginning again: on `lo` coming up, `addrconf_notify(NETDEV_UP)` is called. Then, `addrconf_init_auto_addrs(dev)` is called, which calls `addrconf_dad_run(idev, false)`. So it seems there is another code path from which DAD can be started. I'll need to check which route is taken, to ensure the notification of the route is properly added.
|
| 33/2 |
2026/09/21 00:59 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addrconf_dad_run]
Results: map[SourceCode:4418: static void addrconf_dad_run(struct inet6_dev *idev, bool restart)
4419: {
4420: struct inet6_ifaddr *ifp;
4421:
4422: read_lock_bh(&idev->lock);
4423: list_for_each_entry(ifp, &idev->addr_list, if_list) {
4424: spin_lock(&ifp->lock);
4425: if ((ifp->flags & IFA_F_TENTATIVE &&
4426: ifp->state == INET6_IFADDR_STATE_DAD) || restart) {
4427: if (restart)
4428: ifp->state = INET6_IFADDR_STATE_PREDAD;
4429: addrconf_dad_kick(ifp);
4430: }
4431: spin_unlock(&ifp->lock);
4432: }
4433: read_unlock_bh(&idev->lock);
4434: }
SourceFile:net/ipv6/addrconf.c]
|
| 34/2 |
2026/09/21 00:59 |
llm |
expert |
0m
Model:
Tokens:
input: 36615
output: 39
thoughts: 1767
Thoughts: **Analyzing the IPv6 Address Addition and DAD Process**
Okay, let's break this down step by step. I'm focusing on the interaction between address configuration, Duplicate Address Detection (DAD), and the potential timing issues that could lead to a bug, given the provided reproducer.
First, my initial thought is: `addrconf_dad_run` is responsible for triggering DAD for addresses that are in the `INET6_IFADDR_STATE_DAD` state. However, `fixup_permanent_addr` sets the interface's state to `INET6_IFADDR_STATE_PREDAD` in `addrconf_dad_start`, which seems like the beginning of the process.
The key is that `addrconf_dad_start` queues `addrconf_dad_work`, which runs asynchronously, which is a potential race. My question is, is it possible that `addrconf_dad_work` could run *before* `addrconf_ifdown` has completed? However, on further thought, `addrconf_ifdown` holds `rtnl_lock`, and `addrconf_dad_work` also takes `rtnl_net_lock(net)`, so they are serialized. This makes me consider it unlikely to be a problem based on the context of the locks.
Now, let's re-examine the reproducer code. We have a socket creation, and an `ioctl` to get the interface index for "lo". Then, a `sendmsg` call adds the IPv6 address. Right after that, the code calls `ioctl` again, this time to set the "lo" interface up, setting the `IFF_UP` flag.
My primary concern is this: if "lo" is down when the IPv6 address is added, and if the "lo" interface is not UP by default in this specific namespace, this might trigger a specific codepath.
Let's look at `inet6_addr_add`. It uses `ipv6_add_addr` to add the address. That code does the crucial stuff, so the question is, does `ipv6_add_addr` create the host route (`ifp->rt`)? Then, given that the address is added, we consider `ifp->flags`. If the address is not optimistic and DAD is *not* disabled, `ipv6_ifa_notify` is called. That makes me think that the race is a little less likely. Then, `addrconf_dad_start` is invoked.
|
| 35/2 |
2026/09/21 00:59 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:ipv6_add_addr]
Results: map[SourceCode:1073: static struct inet6_ifaddr *
1074: ipv6_add_addr(struct inet6_dev *idev, struct ifa6_config *cfg,
1075: bool can_block, struct netlink_ext_ack *extack)
1076: {
1077: gfp_t gfp_flags = can_block ? GFP_KERNEL : GFP_ATOMIC;
1078: int addr_type = ipv6_addr_type(cfg->pfx);
1079: struct net *net = dev_net(idev->dev);
1080: struct inet6_ifaddr *ifa = NULL;
1081: struct fib6_info *f6i = NULL;
1082: int err = 0;
1083:
1084: if (addr_type == IPV6_ADDR_ANY) {
1085: NL_SET_ERR_MSG_MOD(extack, "Invalid address");
1086: return ERR_PTR(-EADDRNOTAVAIL);
1087: } else if (addr_type & IPV6_ADDR_MULTICAST &&
1088: !(cfg->ifa_flags & IFA_F_MCAUTOJOIN)) {
1089: NL_SET_ERR_MSG_MOD(extack, "Cannot assign multicast address without \"IFA_F_MCAUTOJOIN\" flag");
1090: return ERR_PTR(-EADDRNOTAVAIL);
1091: } else if (!(idev->dev->flags & IFF_LOOPBACK) &&
1092: !netif_is_l3_master(idev->dev) &&
1093: addr_type & IPV6_ADDR_LOOPBACK) {
1094: NL_SET_ERR_MSG_MOD(extack, "Cannot assign loopback address on this device");
1095: return ERR_PTR(-EADDRNOTAVAIL);
1096: }
1097:
1098: if (idev->dead) {
1099: NL_SET_ERR_MSG_MOD(extack, "device is going away");
1100: err = -ENODEV;
1101: goto out;
1102: }
1103:
1104: if (idev->cnf.disable_ipv6) {
1105: NL_SET_ERR_MSG_MOD(extack, "IPv6 is disabled on this device");
1106: err = -EACCES;
1107: goto out;
1108: }
1109:
1110: /* validator notifier needs to be blocking;
1111: * do not call in atomic context
1112: */
1113: if (can_block) {
1114: struct in6_validator_info i6vi = {
1115: .i6vi_addr = *cfg->pfx,
1116: .i6vi_dev = idev,
1117: .extack = extack,
1118: };
1119:
1120: err = inet6addr_validator_notifier_call_chain(NETDEV_UP, &i6vi);
1121: err = notifier_to_errno(err);
1122: if (err < 0)
1123: goto out;
1124: }
1125:
1126: ifa = kzalloc_obj(*ifa, gfp_flags | __GFP_ACCOUNT);
1127: if (!ifa) {
1128: err = -ENOBUFS;
1129: goto out;
1130: }
1131:
1132: f6i = addrconf_f6i_alloc(net, idev, cfg->pfx, false, gfp_flags, extack);
1133: if (IS_ERR(f6i)) {
1134: err = PTR_ERR(f6i);
1135: f6i = NULL;
1136: goto out;
1137: }
1138:
1139: neigh_parms_data_state_setall(idev->nd_parms);
1140:
1141: ifa->addr = *cfg->pfx;
1142: if (cfg->peer_pfx)
1143: ifa->peer_addr = *cfg->peer_pfx;
1144:
1145: spin_lock_init(&ifa->lock);
1146: INIT_DELAYED_WORK(&ifa->dad_work, addrconf_dad_work);
1147: INIT_HLIST_NODE(&ifa->addr_lst);
1148: ifa->scope = cfg->scope;
1149: ifa->prefix_len = cfg->plen;
1150: ifa->rt_priority = cfg->rt_priority;
1151: ifa->flags = cfg->ifa_flags;
1152: ifa->ifa_proto = cfg->ifa_proto;
1153: /* No need to add the TENTATIVE flag for addresses with NODAD */
1154: if (!(cfg->ifa_flags & IFA_F_NODAD))
1155: ifa->flags |= IFA_F_TENTATIVE;
1156: ifa->valid_lft = cfg->valid_lft;
1157: ifa->prefered_lft = cfg->preferred_lft;
1158: ifa->cstamp = ifa->tstamp = jiffies;
1159: ifa->tokenized = false;
1160:
1161: ifa->rt = f6i;
1162:
1163: ifa->idev = idev;
1164: in6_dev_hold(idev);
1165:
1166: /* For caller */
1167: refcount_set(&ifa->refcnt, 1);
1168:
1169: rcu_read_lock();
1170:
1171: err = ipv6_add_addr_hash(idev->dev, ifa);
1172: if (err < 0) {
1173: rcu_read_unlock();
1174: goto out;
1175: }
1176:
1177: write_lock_bh(&idev->lock);
1178:
1179: /* Add to inet6_dev unicast addr list. */
1180: ipv6_link_dev_addr(idev, ifa);
1181:
1182: if (ifa->flags&IFA_F_TEMPORARY) {
1183: /* manage_tempaddrs() relies on addresses being added to the head */
1184: list_add(&ifa->tmp_list, &idev->tempaddr_list);
1185: in6_ifa_hold(ifa);
1186: }
1187:
1188: in6_ifa_hold(ifa);
1189: write_unlock_bh(&idev->lock);
1190:
1191: rcu_read_unlock();
1192:
1193: inet6addr_notifier_call_chain(NETDEV_UP, ifa);
1194: out:
1195: if (unlikely(err < 0)) {
1196: fib6_info_release(f6i);
1197:
1198: if (ifa) {
1199: if (ifa->idev)
1200: in6_dev_put(ifa->idev);
1201: kfree(ifa);
1202: }
1203: ifa = ERR_PTR(err);
1204: }
1205:
1206: return ifa;
1207: }
SourceFile:net/ipv6/addrconf.c]
|
| 36/2 |
2026/09/21 00:59 |
llm |
expert |
0m
Model:
Tokens:
input: 41093
output: 38
thoughts: 951
Thoughts: **Analyzing IPv6 Address Addition and DAD Behavior**
Okay, so I'm tracing the IPv6 address addition process, specifically focusing on how it interacts with Duplicate Address Detection (DAD) and the potential for missing host routes. I see that `ipv6_add_addr` initially creates a host route, `f6i`, and assigns it to `ifa->rt`. Then, `inet6_addr_add` kicks off `addrconf_dad_start(ifp)`.
Hold on, the reproducer sets `IFA_F_NODAD`, which is 0x40. This means `ipv6_add_addr` *won't* set `IFA_F_TENTATIVE`. `inet6_addr_add` does something different in that case:
```c
/* Send a netlink notification if DAD is enabled and
* optimistic flag is not set
*/
if (!(ifp->flags & (IFA_F_OPTIMISTIC | IFA_F_NODAD)))
ipv6_ifa_notify(0, ifp);
/*
* Note that section 3.1 of RFC 4429 indicates
* that the Optimistic flag should not be set for
* manually configured addresses
*/
addrconf_dad_start(ifp);
```
Since `IFA_F_NODAD` is set, it skips `ipv6_ifa_notify(0, ifp)`. *However*, it still calls `addrconf_dad_start(ifp)`. `addrconf_dad_start` queues `addrconf_dad_work`. Later, `addrconf_dad_work` runs and calls `addrconf_dad_begin`.
Now, the crucial part: inside `addrconf_dad_begin`:
```c
if (dev->flags&(IFF_NOARP|IFF_LOOPBACK) ||
(READ_ONCE(net->ipv6.devconf_all->accept_dad) < 1 &&
READ_ONCE(idev->cnf.accept_dad) < 1) ||
!(ifp->flags&IFA_F_TENTATIVE) ||
ifp->flags & IFA_F_NODAD) {
bool send_na = false;
if (ifp->flags & IFA_F_TENTATIVE &&
!(ifp->flags & IFA_F_OPTIMISTIC))
send_na = true;
bump_id = ifp->flags & IFA_F_TENTATIVE;
ifp->flags &= ~(IFA_F_TENTATIVE|IFA_F_OPTIMISTIC|IFA_F_DADFAILED);
spin_unlock(&ifp->lock);
read_unlock_bh(&idev->lock);
addrconf_dad_completed(ifp, bump_id, send_na);
return;
}
```
Because `ifp->flags` has `IFA_F_NODAD`, it calls `addrconf_dad_completed` immediately. Then `addrconf_dad_completed` calls `ipv6_ifa_notify(RTM_NEWADDR, ifp)`. Here's where it gets interesting. If `lo` (loopback) is DOWN when the address is added, `ipv6_ifa_notify` calls `__ipv6_ifa_notify`.
In `__ipv6_ifa_notify`:
```c
case RTM_NEWADDR:
if (ifp->rt && !rcu_access_pointer(ifp->rt->fib6_node)) {
ip6_ins_rt(net, ifp->rt);
} else if (!ifp->rt && (ifp->idev->dev->flags & IFF_UP)) {
pr_warn("BUG: Address %pI6c on device %s is missing its host route.\n",
&ifp->addr, ifp->idev->dev->name);
}
```
Now, if `lo` is DOWN, `ifp->idev->dev->flags & IFF_UP` is false, so it *doesn't* print the warning. Crucially, `ip6_ins_rt` is called because `ifp->rt` is not NULL and `ifp->rt->fib6_node` is NULL. This means that even with `IFA_F_NODAD` and `lo` down, the host route that `ipv6_add_addr` initially created might be inserted. I need to be sure though. I'll need to check the
|
| 37/2 |
2026/09/21 00:59 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/route.c Name:ip6_ins_rt]
Results: map[SourceCode:1362: int ip6_ins_rt(struct net *net, struct fib6_info *rt)
1363: {
1364: struct nl_info info = { .nl_net = net, };
1365:
1366: return __ip6_ins_rt(rt, &info, NULL);
1367: }
SourceFile:net/ipv6/route.c]
|
| 38/2 |
2026/09/21 00:59 |
llm |
expert |
0m
Model:
Tokens:
input: 43235
output: 39
thoughts: 485
Thoughts: **Analyzing the IPv6 Route Insertion and Address Configuration**
Okay, let's break this down. My initial question is whether inserting a route (`ip6_ins_rt`) succeeds when `lo` is initially DOWN. If it *does* succeed, then `ifp->rt->fib6_node` gets set, right? The reproducer subsequently brings `lo` UP.
When `lo` transitions to UP, `addrconf_notify(NETDEV_UP)` is triggered, which then calls `addrconf_permanent_addr`. This, in turn, calls `fixup_permanent_addr`. Crucially, the code checks:
```c
if (!ifp->rt || !ifp->rt->fib6_node) {
```
Since the route was successfully inserted earlier (despite `lo` being down at the time), `ifp->rt` *is* not NULL and `ifp->rt->fib6_node` is *also* not NULL. So, no new route is allocated.
Instead, the code proceeds to call `addrconf_dad_start(ifp)`. Hmm, now this is interesting. `addrconf_dad_start` *queues* `addrconf_dad_work` again! The reason is because `ifp->state` is likely `INET6_IFADDR_STATE_POSTDAD` (or potentially `INET6_IFADDR_STATE_DEAD`).
Now, I'm reminded that when `lo` goes DOWN, `addrconf_ifdown` is called. But, and this is key, `lo` was already DOWN when the address was added!
Let's quickly recap the reproducer's steps:
1. Is `lo` UP by default? I need to clarify this. I'll test it; in a fresh network namespace, `lo` is DOWN by default. Right, so is the reproducer creating a new network namespace? I'll check... No, the reproducer doesn't explicitly call `unshare(CLONE_NEWNET)`. However, syzkaller, which runs the tests, *does* usually create a new network namespace as part of its sandbox environment. So, yes, `lo` is DOWN at the start.
2. The reproducer then adds the address to `lo`.
Since `lo` is DOWN, `addrconf_dad_work` *will* run and call `addrconf_dad_completed`. That, in turn, calls `ipv6_ifa_notify(RTM_NEWADDR)`. This notification then calls `ip6_ins_rt`.
Now, the important question is: if `lo` is DOWN, could `ip6_ins_rt` *fail* because the device is down? Let's quickly review the implementation of `__ip6_ins_rt` to confirm the device state check.
|
| 39/2 |
2026/09/21 00:59 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/route.c Name:__ip6_ins_rt]
Results: map[SourceCode:1348: static int __ip6_ins_rt(struct fib6_info *rt, struct nl_info *info,
1349: struct netlink_ext_ack *extack)
1350: {
1351: int err;
1352: struct fib6_table *table;
1353:
1354: table = rt->fib6_table;
1355: spin_lock_bh(&table->tb6_lock);
1356: err = fib6_add(&table->tb6_root, rt, info, extack);
1357: spin_unlock_bh(&table->tb6_lock);
1358:
1359: return err;
1360: }
SourceFile:net/ipv6/route.c]
|
| 40/2 |
2026/09/21 00:59 |
llm |
expert |
1m
Model:
Tokens:
input: 44604
output: 56
thoughts: 8612
Thoughts: **My Analysis of the IPv6 Host Route Bug**
Okay, so here's what's happening. I'm looking at this `fib6_add` function and immediately asking myself if it checks if the network interface is up. Typically, adding a route when an interface is down is fine, it just means the route isn't usable yet. The core issue seems to revolve around the interaction between the loopback device (`lo`) being brought up and down and how IPv6 addresses and their routes are handled within that process, particularly when Duplicate Address Detection (DAD) is involved, along with the interaction with `keep_addr_on_down` and the use of the `IFA_F_NODAD` flag.
The reproducer code brings `lo` up, which causes `addrconf_notify(NETDEV_UP)` to be called, followed by `addrconf_permanent_addr`. My initial expectation is that if `ip6_ins_rt` had run earlier (meaning we *had* a route), `fixup_permanent_addr` should not allocate a *new* route. Instead it'll go on to trigger DAD with `addrconf_dad_start`. Crucially, it is setting `ifp->state = INET6_IFADDR_STATE_PREDAD` and queues `addrconf_dad_work`. Because of `IFA_F_NODAD`, `addrconf_dad_work` completes without DAD actually happening, which causes `ipv6_ifa_notify` to be called with `RTM_NEWADDR`. However, the code *should* *not* be printing the warning because the route already exists.
The reproducer then sets `lo` down. This triggers `addrconf_ifdown`, which sets `ifa->rt = NULL` and schedules the cancellation of the `dad_work`. If `addrconf_ifdown` sets the route to NULL *before* `addrconf_dad_work` runs, there would be a problem. This means that a scheduled `addrconf_dad_work` could run after `addrconf_ifdown` has already zeroed out the route.
When this race occurs, I expect `addrconf_dad_work` to run after `addrconf_ifdown`. Because the work is cancelled during `addrconf_ifdown` it should not execute *after* the down event. That means the `ifp->rt` is NULL in `__ipv6_ifa_notify`, *but* the warning should *not* trigger because the device *must* be down at that time. `IFF_UP` must be false.
However, the bug is still being printed. It looks like somehow `iff_up` can still be true *after* the route is deleted. Then it calls `__ipv6_ifa_notify`. The check `ifp->idev->dev->flags & IFF_UP` seems to be the crucial one that should *prevent* the warning from being printed. I have to find a condition when `ifp->idev->dev->flags & IFF_UP` is true *after* `ifp->rt` is null. The race appears to be happening, with a missed state change somewhere. There seems to be something in the setup, or the state change that causes the `iff_up` flag to be true when it really should not be. The bug might be a *data race* where `IFF_UP` is being accessed without the proper locking *after* the route is removed.
If MTU changes occur this could trigger the problem with a NETDEV_DOWN event.
Also, the `addrconf_del_dad_work(ifa)` cancels the work. If it's already running, then it does nothing. So it's still possible that `addrconf_dad_work` sees the null route but a up flag.
The problem seems to occur if `lo` is set down *during* the execution of `addrconf_dad_work` *before* the check `ifp->idev->dev->flags & IFF_UP` is performed. This would be a *true* race and a subtle timing issue in the network stack.
It all boils down to a race between the `addrconf_dad_work` routine and the `addrconf_ifdown` routine, with the `IFF_UP` flag not being updated atomically with the route pointer, that leaves the route pointer `NULL` *before* the `IFF_UP` flag is cleared.
|
| 41/2 |
2026/09/21 01:00 |
tool |
codesearch-find-references |
0m
Args: map[ContextFile:net/ipv6/addrconf.c IncludeSnippetLines:0 Name:ipv6_ifa_notify SourceTreePrefix:net/ipv6]
Results: map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:add_addr SourceFile:net/ipv6/addrconf.c SourceLine:3230] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:addrconf_dad_begin SourceFile:net/ipv6/addrconf.c SourceLine:4193] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:addrconf_dad_completed SourceFile:net/ipv6/addrconf.c SourceLine:4355] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:addrconf_dad_stop SourceFile:net/ipv6/addrconf.c SourceLine:2151] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:addrconf_prefix_rcv_add_addr SourceFile:net/ipv6/addrconf.c SourceLine:2783] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:addrconf_verify_rtnl SourceFile:net/ipv6/addrconf.c SourceLine:4734] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:inet6_addr_add SourceFile:net/ipv6/addrconf.c SourceLine:3085] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:inet6_addr_modify SourceFile:net/ipv6/addrconf.c SourceLine:4932] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:ipv6_del_addr SourceFile:net/ipv6/addrconf.c SourceLine:1346] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:manage_tempaddrs SourceFile:net/ipv6/addrconf.c SourceLine:2666]] TruncatedOutput:false]
|
| 42/2 |
2026/09/21 01:00 |
llm |
expert |
0m
Model:
Tokens:
input: 54783
output: 39
thoughts: 12
Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience and written in the first person:
**Analyzing `inet6_addr_modify`**
Okay, time to dive into `inet6_addr_modify`. My gut reaction is to assess its impact on the existing IPv6 address configuration mechanisms. I'm immediately considering potential race conditions, especially given the stateful nature of IPv6 address management and the prevalence of dynamic configuration through protocols like DHCPv6 or SLAAC. I need to understand exactly what parameters this function accepts β is it directly modifying the address structure, or does it trigger callbacks that might interact with other network components? Are there any locking mechanisms in place to protect against concurrent modifications?
Beyond basic concurrency considerations, I'm thinking about the implications for Neighbor Discovery (ND). If an address is modified, does the stack correctly generate new Neighbor Advertisement (NA) messages? Does it update the cache appropriately? I also need to verify it handles multicast addresses correctly and that there aren't any potential leaks where modified addresses might remain cached in various tables, leading to routing issues.
Then there's the question of error handling. What happens if the modification fails for some reason? Does the system gracefully revert to the previous configuration, or does it leave the interface in an inconsistent state? What are the potential consequences of such a failure? I'm already anticipating the need to check the return codes and trace their propagation through the call stack to see if any of these failure paths are adequately handled.
|
| 43/2 |
2026/09/21 01:00 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:inet6_addr_modify]
Results: map[SourceCode:4887: static int inet6_addr_modify(struct net *net, struct inet6_ifaddr *ifp,
4888: struct ifa6_config *cfg, clock_t expires,
4889: u32 flags)
4890: {
4891: bool was_managetempaddr;
4892: bool new_peer = false;
4893: bool had_prefixroute;
4894:
4895: ASSERT_RTNL_NET(net);
4896:
4897: if (cfg->ifa_flags & IFA_F_MANAGETEMPADDR &&
4898: (ifp->flags & IFA_F_TEMPORARY || ifp->prefix_len != 64))
4899: return -EINVAL;
4900:
4901: if (!(ifp->flags & IFA_F_TENTATIVE) || ifp->flags & IFA_F_DADFAILED)
4902: cfg->ifa_flags &= ~IFA_F_OPTIMISTIC;
4903:
4904: if (cfg->peer_pfx &&
4905: memcmp(&ifp->peer_addr, cfg->peer_pfx, sizeof(struct in6_addr))) {
4906: if (!ipv6_addr_any(&ifp->peer_addr))
4907: cleanup_prefix_route(ifp, expires, true, true);
4908: new_peer = true;
4909: }
4910:
4911: spin_lock_bh(&ifp->lock);
4912: was_managetempaddr = ifp->flags & IFA_F_MANAGETEMPADDR;
4913: had_prefixroute = ifp->flags & IFA_F_PERMANENT &&
4914: !(ifp->flags & IFA_F_NOPREFIXROUTE);
4915: ifp->flags &= ~(IFA_F_DEPRECATED | IFA_F_PERMANENT | IFA_F_NODAD |
4916: IFA_F_HOMEADDRESS | IFA_F_MANAGETEMPADDR |
4917: IFA_F_NOPREFIXROUTE);
4918: ifp->flags |= cfg->ifa_flags;
4919: WRITE_ONCE(ifp->tstamp, jiffies);
4920: WRITE_ONCE(ifp->valid_lft, cfg->valid_lft);
4921: WRITE_ONCE(ifp->prefered_lft, cfg->preferred_lft);
4922: WRITE_ONCE(ifp->ifa_proto, cfg->ifa_proto);
4923:
4924: if (cfg->rt_priority && cfg->rt_priority != ifp->rt_priority)
4925: WRITE_ONCE(ifp->rt_priority, cfg->rt_priority);
4926:
4927: if (new_peer)
4928: ifp->peer_addr = *cfg->peer_pfx;
4929:
4930: spin_unlock_bh(&ifp->lock);
4931: if (!(ifp->flags&IFA_F_TENTATIVE))
4932: ipv6_ifa_notify(0, ifp);
4933:
4934: if (!(cfg->ifa_flags & IFA_F_NOPREFIXROUTE)) {
4935: int rc = -ENOENT;
4936:
4937: if (had_prefixroute)
4938: rc = modify_prefix_route(net, ifp, expires, flags, false);
4939:
4940: /* prefix route could have been deleted; if so restore it */
4941: if (rc == -ENOENT) {
4942: addrconf_prefix_route(&ifp->addr, ifp->prefix_len,
4943: ifp->rt_priority, ifp->idev->dev,
4944: expires, flags, GFP_KERNEL);
4945: }
4946:
4947: if (had_prefixroute && !ipv6_addr_any(&ifp->peer_addr))
4948: rc = modify_prefix_route(net, ifp, expires, flags, true);
4949:
4950: if (rc == -ENOENT && !ipv6_addr_any(&ifp->peer_addr)) {
4951: addrconf_prefix_route(&ifp->peer_addr, ifp->prefix_len,
4952: ifp->rt_priority, ifp->idev->dev,
4953: expires, flags, GFP_KERNEL);
4954: }
4955: } else if (had_prefixroute) {
4956: enum cleanup_prefix_rt_t action;
4957: unsigned long rt_expires;
4958:
4959: write_lock_bh(&ifp->idev->lock);
4960: action = check_cleanup_prefix_route(ifp, &rt_expires);
4961: write_unlock_bh(&ifp->idev->lock);
4962:
4963: if (action != CLEANUP_PREFIX_RT_NOP) {
4964: cleanup_prefix_route(ifp, rt_expires,
4965: action == CLEANUP_PREFIX_RT_DEL, false);
4966: }
4967: }
4968:
4969: if (was_managetempaddr || ifp->flags & IFA_F_MANAGETEMPADDR) {
4970: if (was_managetempaddr && !(ifp->flags & IFA_F_MANAGETEMPADDR))
4971: delete_tempaddrs(ifp->idev, ifp);
4972: else
4973: manage_tempaddrs(ifp->idev, ifp, cfg->valid_lft,
4974: cfg->preferred_lft, !was_managetempaddr,
4975: jiffies);
4976: }
4977:
4978: addrconf_verify_rtnl(net);
4979:
4980: return 0;
4981: }
SourceFile:net/ipv6/addrconf.c]
|
| 44/2 |
2026/09/21 01:00 |
llm |
expert |
0m
Model:
Tokens:
input: 56855
output: 41
thoughts: 2966
Thoughts: **Analyzing the IPv6 Address Warning in Network Configuration**
Okay, so I'm trying to figure out why this warning is occurring. It seems to be related to `inet6_addr_modify` calling `ipv6_ifa_notify` with `RTM_NEWADDR`. I need to figure out the conditions that lead to this. If `lo` is down, there's no warning. The issue arises when `lo` is up and `ifp->rt` is somehow NULL. The tricky part is how `ifp->rt` can be null when `lo` is active.
Let's break down the flow. If the address is *kept* on the interface going down, then `addrconf_ifdown` is called. That makes the address's routing table entry `NULL`. Then `lo` comes back up and `addrconf_permanent_addr` runs, which should allocate a *new* routing entry for `ifp`, and make `ifp->rt` non-NULL. But if `fixup_permanent_addr` isn't called, then it's a problem.
The key seems to be `IFA_F_PERMANENT`. If `IFA_F_PERMANENT` isn't set, `fixup_permanent_addr` isn't called, which means the routing entry isn't re-established. However, if the address *is* permanent it *should* get the fixup. There's a question of whether `IFA_F_PERMANENT` can be cleared between `addrconf_ifdown` and `addrconf_permanent_addr`. Nope, that can't happen because of the lock.
Ah, but `inet6_addr_modify` *can* clear `IFA_F_PERMANENT` if the device is down. So if that happens, the permanent address won't get processed. Then `addrconf_dad_run` gets triggered. `addrconf_ifdown` sets the state to `PREDAD`, so `addrconf_dad_run` won't kick it. No one ever starts DAD. Then, if we modify the address again, we get the warning when `ipv6_ifa_notify` is called with `RTM_NEWADDR`, since `ifp->rt` is still NULL and `IFF_UP` is set.
Okay, let's examine the reproducer. It's using `sendmsg`. The first call looks like it's a `RTM_NEWLINK` message to create the interface. The second is an `RTM_NEWADDR` message to add an address. The message has `NLM_F_CREATE` set, not replace, so it's a new address not modification.
So, how does the repro trigger the warning? It seems to be the UP/DOWN sequence:
1. `lo` set UP, so `addrconf_notify(NETDEV_UP)` is called.
2. `lo` is set DOWN, so `addrconf_notify(NETDEV_DOWN)` is called.
If this warning gets triggered, that means it's one of these calls, or perhaps asynchronously. When we set the interface UP, `addrconf_permanent_addr` calls `fixup_permanent_addr` which queues work for DAD, which calls `addrconf_dad_work`. That calls `addrconf_dad_begin`. Since `IFA_F_NODAD` is set, it calls `addrconf_dad_completed`. That does a `ipv6_ifa_notify(RTM_NEWADDR)`.
At this point, is the `ifp->rt` NULL? It should NOT be. But wait, is `fixup_permanent_addr` even called?
Ah! The loopback device! `addrconf_permanent_addr` *does* process permanent addresses. The address is *added* using the `IFA_F_NODAD` flag (0x40) but is NOT permanent `IFA_F_PERMANENT` (0x80) on the interface. So if that bit is cleared when the address is added and `lo` goes down and up, it might be an issue.
|
| 45/2 |
2026/09/21 01:01 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:inet6_rtm_newaddr]
Results: map[SourceCode:4983: static int
4984: inet6_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh,
4985: struct netlink_ext_ack *extack)
4986: {
4987: struct net *net = sock_net(skb->sk);
4988: struct nlattr *tb[IFA_MAX+1];
4989: struct in6_addr *peer_pfx;
4990: struct inet6_ifaddr *ifa;
4991: struct net_device *dev;
4992: struct inet6_dev *idev;
4993: struct ifa6_config cfg;
4994: struct ifaddrmsg *ifm;
4995: unsigned long timeout;
4996: clock_t expires;
4997: u32 flags;
4998: int err;
4999:
5000: err = nlmsg_parse_deprecated(nlh, sizeof(*ifm), tb, IFA_MAX,
5001: ifa_ipv6_policy, extack);
5002: if (err < 0)
5003: return err;
5004:
5005: memset(&cfg, 0, sizeof(cfg));
5006:
5007: ifm = nlmsg_data(nlh);
5008: cfg.pfx = extract_addr(tb[IFA_ADDRESS], tb[IFA_LOCAL], &peer_pfx);
5009: if (!cfg.pfx)
5010: return -EINVAL;
5011:
5012: cfg.peer_pfx = peer_pfx;
5013: cfg.plen = ifm->ifa_prefixlen;
5014: if (tb[IFA_RT_PRIORITY])
5015: cfg.rt_priority = nla_get_u32(tb[IFA_RT_PRIORITY]);
5016:
5017: if (tb[IFA_PROTO])
5018: cfg.ifa_proto = nla_get_u8(tb[IFA_PROTO]);
5019:
5020: cfg.ifa_flags = nla_get_u32_default(tb[IFA_FLAGS], ifm->ifa_flags);
5021:
5022: /* We ignore other flags so far. */
5023: cfg.ifa_flags &= IFA_F_NODAD | IFA_F_HOMEADDRESS |
5024: IFA_F_MANAGETEMPADDR | IFA_F_NOPREFIXROUTE |
5025: IFA_F_MCAUTOJOIN | IFA_F_OPTIMISTIC;
5026:
5027: cfg.ifa_flags |= IFA_F_PERMANENT;
5028: cfg.valid_lft = INFINITY_LIFE_TIME;
5029: cfg.preferred_lft = INFINITY_LIFE_TIME;
5030: expires = 0;
5031: flags = 0;
5032:
5033: if (tb[IFA_CACHEINFO]) {
5034: struct ifa_cacheinfo *ci;
5035:
5036: ci = nla_data(tb[IFA_CACHEINFO]);
5037: cfg.valid_lft = ci->ifa_valid;
5038: cfg.preferred_lft = ci->ifa_prefered;
5039:
5040: if (!cfg.valid_lft || cfg.preferred_lft > cfg.valid_lft) {
5041: NL_SET_ERR_MSG_MOD(extack, "address lifetime invalid");
5042: return -EINVAL;
5043: }
5044:
5045: timeout = addrconf_timeout_fixup(cfg.valid_lft, HZ);
5046: if (addrconf_finite_timeout(timeout)) {
5047: cfg.ifa_flags &= ~IFA_F_PERMANENT;
5048: cfg.valid_lft = timeout;
5049: expires = jiffies_to_clock_t(timeout * HZ);
5050: flags = RTF_EXPIRES;
5051: }
5052:
5053: timeout = addrconf_timeout_fixup(cfg.preferred_lft, HZ);
5054: if (addrconf_finite_timeout(timeout)) {
5055: if (timeout == 0)
5056: cfg.ifa_flags |= IFA_F_DEPRECATED;
5057:
5058: cfg.preferred_lft = timeout;
5059: }
5060: }
5061:
5062: rtnl_net_lock(net);
5063:
5064: dev = __dev_get_by_index(net, ifm->ifa_index);
5065: if (!dev) {
5066: NL_SET_ERR_MSG_MOD(extack, "Unable to find the interface");
5067: err = -ENODEV;
5068: goto unlock_rtnl;
5069: }
5070:
5071: netdev_lock_ops(dev);
5072: idev = ipv6_find_idev(dev);
5073: if (IS_ERR(idev)) {
5074: err = PTR_ERR(idev);
5075: goto unlock;
5076: }
5077:
5078: if (!ipv6_allow_optimistic_dad(net, idev))
5079: cfg.ifa_flags &= ~IFA_F_OPTIMISTIC;
5080:
5081: if (cfg.ifa_flags & IFA_F_NODAD &&
5082: cfg.ifa_flags & IFA_F_OPTIMISTIC) {
5083: NL_SET_ERR_MSG(extack, "IFA_F_NODAD and IFA_F_OPTIMISTIC are mutually exclusive");
5084: err = -EINVAL;
5085: goto unlock;
5086: }
5087:
5088: ifa = ipv6_get_ifaddr(net, cfg.pfx, dev, 1);
5089: if (!ifa) {
5090: /*
5091: * It would be best to check for !NLM_F_CREATE here but
5092: * userspace already relies on not having to provide this.
5093: */
5094: err = inet6_addr_add(net, dev, &cfg, expires, flags, extack);
5095: goto unlock;
5096: }
5097:
5098: if (nlh->nlmsg_flags & NLM_F_EXCL ||
5099: !(nlh->nlmsg_flags & NLM_F_REPLACE)) {
5100: NL_SET_ERR_MSG_MOD(extack, "address already assigned");
5101: err = -EEXIST;
5102: } else {
5103: err = inet6_addr_modify(net, ifa, &cfg, expires, flags);
5104: }
5105:
5106: in6_ifa_put(ifa);
5107: unlock:
5108: netdev_unlock_ops(dev);
5109: unlock_rtnl:
5110: rtnl_net_unlock(net);
5111:
5112: return err;
5113: }
SourceFile:net/ipv6/addrconf.c]
|
| 46/2 |
2026/09/21 01:01 |
llm |
expert |
0m
Model:
Tokens:
input: 62877
output: 18
thoughts: 2396
Thoughts: **Analyzing a Potential IPv6 Address Host Route Bug**
Okay, so I'm digging into this IPv6 address host route issue. The initial setup looks straightforward: `cfg.ifa_flags |= IFA_F_PERMANENT;`, which means this address is intended to be permanent, unless a valid lifetime (`IFA_CACHEINFO`) is provided. The key seems to be whether the `IFA_CACHEINFO` attribute is present and if its lifetime is finite. If so, `IFA_F_PERMANENT` gets cleared, making the address *not* permanent.
I'm looking at the reproducer's `sendmsg` payload and immediately notice some oddness in the attribute structure. There's a malformed attribute length (`c3 ef`) that should be 0x1d, but is not, according to syzkaller's report. The parser, `nlmsg_parse_deprecated`, should be able to handle this. It looks like the length field of the second attribute is wrong, and it *should* return an error, but it's not. I've re-reviewed the code, confirming that it's allowed to *ignore* trailing garbage if `strict = false`.
I'm focusing on why the host route is missing. The code warns if an address is UP but missing its host route. My first thought was that this is due to `addrconf_dad_completed`. However, it's not the correct logic in this scenario. Then, I considered `inet6_rtm_newaddr`, but `IFA_F_NODAD` is set. If `addrconf_permanent_addr` fails, the `ifp->rt` pointer is not allocated, and the address is removed. So `ifp->rt` should *not* be NULL if the address exists. I've looked at where `ifp->rt` *could* be set to NULL, and the only relevant place is `addrconf_ifdown`, which occurs on interface shutdown. But `lo` is not down, it's UP, so this is not the explanation.
It seems I'm overlooking something. My next step is to examine *all* locations where `ifp->rt` is assigned a NULL value to rule out unexpected scenarios. I will also double-check the interaction between interface state (UP/DOWN) and address permanence to make sure the permanent address logic is followed correctly.
|
| 47/2 |
2026/09/21 01:01 |
tool |
grepper |
0m
Args: map[Expression:->rt = NULL]
Results: map[Output:drivers/s390/char/tape_char.c=80=tapechar_cleanup_device(struct tape_device *device)
--
drivers/s390/char/tape_char.c-82- unregister_tape_dev(&device->cdev->dev, device->rt);
drivers/s390/char/tape_char.c:83: device->rt = NULL;
drivers/s390/char/tape_char.c-84- unregister_tape_dev(&device->cdev->dev, device->nt);
--
net/ipv6/addrconf.c=3875=static int addrconf_ifdown(struct net_device *dev, bool unregister)
--
net/ipv6/addrconf.c-3999- rt = ifa->rt;
net/ipv6/addrconf.c:4000: ifa->rt = NULL;
net/ipv6/addrconf.c-4001- } else {
--
net/ipv6/addrconf.c=6298=static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
--
net/ipv6/addrconf.c-6345- ip6_del_rt(net, ifp->rt, false);
net/ipv6/addrconf.c:6346: ifp->rt = NULL;
net/ipv6/addrconf.c-6347- }
]
|
| 48/2 |
2026/09/21 01:01 |
llm |
expert |
1m
Model:
Tokens:
input: 66177
output: 36
thoughts: 9523
Thoughts: **Analyzing IPv6 Address Configuration on Loopback Interface**
Okay, let's break this down. We're looking at a scenario where we get a warning related to IPv6 address configuration on the loopback interface (`lo`). Specifically, the warning arises from a condition where a route (`ifp->rt`) is unexpectedly NULL when the interface is up (`IFF_UP`). The code suggests that `__ipv6_ifa_notify(RTM_DELADDR)` sets `ifp->rt = NULL` upon address deletion (`RTM_DELADDR`). It can be called by things like `ipv6_del_addr` or `addrconf_ifdown`.
If `addrconf_ifdown` is called with `keep` set to true, it can set the address state to `INET6_IFADDR_STATE_DEAD`. This seems to be at the heart of the issue, and the code confirms that when `__ipv6_ifa_notify(RTM_DELADDR)` is called with `RTM_DELADDR`, `ifp->rt` is set to NULL. However, this is expected behavior, so it doesn't represent the root cause.
The main focus then turns to when `ipv6_ifa_notify(RTM_NEWADDR)` is called, which prints the warning. Several conditions are tested:
* **DAD (Duplicate Address Detection):** `addrconf_dad_begin` calls `ipv6_ifa_notify(RTM_NEWADDR)` if DAD fails, but `IFA_F_NODAD` prevents this.
* **Loopback Up/Down:** The scenario where the loopback interface is brought down (`addrconf_ifdown` sets `ifa->rt = NULL`) and then brought back up (`addrconf_notify(NETDEV_UP)` calls `addrconf_permanent_addr` to allocate `ifp->rt` is explored), but it is not expected that `ifp->rt` is NULL.
It's necessary that `fixup_permanent_addr` allocates `f6i` and sets `ifp->rt = f6i`.
The key is to track how `ifp->rt` is set to NULL when the interface is down.
If `addrconf_dad_work` is queued but cancelled by `addrconf_ifdown` when `lo` goes down, that shouldn't cause an issue, as `ifp->state` checks for dead state and avoids the warning.
The situation when `addrconf_dad_work` blocks on `rtnl_lock` while `lo` is set UP then DOWN, but UP again seems safe, as the work will be skipped or updated.
The next point concerns the case where `fixup_permanent_addr` is not called, even though the interface is UP. This can happen if `IFA_F_PERMANENT` is not set. We have to analyze the code to see if it is cleared between `addrconf_ifdown` and the notify event. The reproducer does not call `inet6_addr_modify`, so that can't be cleared.
Other events such as `NETDEV_CHANGEMTU` can trigger `addrconf_ifdown`, so it's a candidate for analysis. If the MTU is below `IPV6_MIN_MTU`, this could delete IPv6 and clear the route. But, this doesn't fully explain the route not being re-established on device UP, and the reproducer doesn't change MTU.
The real key appears to involve events during the destruction of the network namespace. On exit, the kernel calls `cleanup_net`, `default_device_exit_batch`, `unregister_netdevice_many`, and then `dev_close_many`, which clears `IFF_UP` and calls `NETDEV_DOWN`.
The call to `addrconf_ifdown` happens, but `keep_addr_on_down` is false. So `ifp->rt` is NULL.
Then the key is to determine when `RTM_NEWADDR` would be sent after `addrconf_ifdown`?
If syzkaller reuses the same namespace, it's UP. It can trigger `ipv6_ifa_notify(RTM_NEWADDR)`.
If `lo` is set UP, then the address is added. `ifp->rt` is not NULL. Then it's set DOWN, `addrconf_ifdown` sets `ifp->rt` to NULL.
If the same address is added with `addrconf_ifa_work` calling `inet6_addr_modify`. However, `inet6_addr_modify` is only called if `NLM_F_REPLACE` is set. The reproducer doesn't set it. So
|
| 49/2 |
2026/09/21 01:02 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:drivers/net/loopback.c Name:loopback_setup]
Results: map[SourceCode: 197: /* The loopback device is special. There is only one instance
198: * per network namespace.
199: */
200: static void loopback_setup(struct net_device *dev)
201: {
202: gen_lo_setup(dev, (64 * 1024), &loopback_ethtool_ops, ð_header_ops,
203: &loopback_ops, loopback_dev_free);
204: }
SourceFile:drivers/net/loopback.c]
|
| 50/2 |
2026/09/21 01:02 |
llm |
expert |
0m
Model:
Tokens:
input: 76932
output: 37
thoughts: 11
Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience, presented in the first person:
**Checking `gen_lo_setup`**
Alright, time to dive in. My first thought is to take a look at `gen_lo_setup`. It's a key function, and understanding it is paramount. I need to refresh my understanding of how it's implemented. I will need to check how it handles the initial setup of the low-level oscillators or configurations. Is it handling the PLL settings and the clock dividers? Any external component initialization? Any internal register settings? This function is responsible for creating and configuring the system's fundamental clocking resources, so I should ensure that any dependencies on it are properly handled. I should check for any potential edge cases that can lead to race conditions, incorrect timing or undefined behavior. I need to confirm whether any recent changes have impacted its functionality or performance. Ultimately, I need to make sure this foundational component is robust and configured correctly, because everything else builds on it.
|
| 51/2 |
2026/09/21 01:03 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:drivers/net/loopback.c Name:gen_lo_setup]
Results: map[SourceCode: 161: static void gen_lo_setup(struct net_device *dev,
162: unsigned int mtu,
163: const struct ethtool_ops *eth_ops,
164: const struct header_ops *hdr_ops,
165: const struct net_device_ops *dev_ops,
166: void (*dev_destructor)(struct net_device *dev))
167: {
168: dev->mtu = mtu;
169: dev->hard_header_len = ETH_HLEN; /* 14 */
170: dev->min_header_len = ETH_HLEN; /* 14 */
171: dev->addr_len = ETH_ALEN; /* 6 */
172: dev->type = ARPHRD_LOOPBACK; /* 0x0001*/
173: dev->flags = IFF_LOOPBACK;
174: dev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
175: dev->lltx = true;
176: dev->netns_immutable = true;
177: netif_keep_dst(dev);
178: dev->hw_features = NETIF_F_GSO_SOFTWARE;
179: dev->features = NETIF_F_SG | NETIF_F_FRAGLIST
180: | NETIF_F_GSO_SOFTWARE
181: | NETIF_F_HW_CSUM
182: | NETIF_F_RXCSUM
183: | NETIF_F_SCTP_CRC
184: | NETIF_F_HIGHDMA
185: | NETIF_F_VLAN_CHALLENGED
186: | NETIF_F_LOOPBACK;
187: dev->ethtool_ops = eth_ops;
188: dev->header_ops = hdr_ops;
189: dev->netdev_ops = dev_ops;
190: dev->needs_free_netdev = true;
191: dev->pcpu_stat_type = NETDEV_PCPU_STAT_LSTATS;
192: dev->priv_destructor = dev_destructor;
193:
194: netif_set_tso_max_size(dev, GSO_MAX_SIZE);
195: }
SourceFile:drivers/net/loopback.c]
|
| 52/2 |
2026/09/21 01:03 |
llm |
expert-compressor |
0m
Model:
Reply: ### Workspace and Investigation Summary
#### 1. Bug Report & Overview
- **Reported Kernel Message**:
`IPv6: BUG: Address 2001::fb on device lo is missing its host route.` (repeated many times).
- **Originating Code Location**:
`net/ipv6/addrconf.c:6320` in `__ipv6_ifa_notify()`:
```c
} else if (!ifp->rt && (ifp->idev->dev->flags & IFF_UP)) {
pr_warn("BUG: Address %pI6c on device %s is missing its host route.\n",
&ifp->addr, ifp->idev->dev->name);
}
```
- **Nature of the message**:
Despite the string `"BUG: "`, this is emitted via `pr_warn()`, not `BUG()` or `panic()`. It does not halt the system or crash the kernel.
#### 2. Analysis of the Reproducer
- Syzkaller reproducer actions:
1. Opens netlink route socket (`AF_NETLINK`, `NETLINK_ROUTE`).
2. Sends initial netlink message (`sendmsg`).
3. Mounts `proc` at `./proc`.
4. Writes `"1\n"` to `./proc/sys/net/ipv6/conf/all/keep_addr_on_down`.
5. Gets interface index of `"lo"` via `ioctl(SIOCGIFINDEX)`.
6. Sends `RTM_NEWADDR` netlink message configuring IPv6 address `2001::fb` with prefix length 64 (`0x40`) and flags including `IFA_F_NODAD` (0x40) on `lo`.
7. Calls `ioctl(SIOCSIFFLAGS)` setting flags to `IFF_UP` (1) on `lo`.
8. Calls `ioctl(SIOCSIFFLAGS)` setting flags to `0` (interface down) on `lo`.
#### 3. Code Flow Analysis & Findings So Far
- **Address Creation (`inet6_rtm_newaddr` -> `inet6_addr_add` -> `ipv6_add_addr`)**:
- Sets `ifa->flags = cfg->ifa_flags | IFA_F_PERMANENT`.
- With `IFA_F_NODAD`, `IFA_F_TENTATIVE` is not set.
- Allocates host route: `f6i = addrconf_f6i_alloc(...)`, sets `ifa->rt = f6i`.
- In `inet6_addr_add`:
- Checks `if (!(ifp->flags & (IFA_F_OPTIMISTIC | IFA_F_NODAD))) ipv6_ifa_notify(0, ifp);` -> skipped because `IFA_F_NODAD` is set.
- Calls `addrconf_dad_start(ifp)`.
- `addrconf_dad_start()` queues `addrconf_dad_work` delayed work.
- **Interface Going Down (`addrconf_ifdown`)**:
- When `lo` goes down and `keep_addr_on_down` is enabled:
- Address `2001::fb` is permanent and not local (`!addr_is_local()`).
- `keep = true`.
- `ifa->state = INET6_IFADDR_STATE_PREDAD;`
- `rt = ifa->rt;`
- `ifa->rt = NULL;`
- `ip6_del_rt(net, rt, false);`
- Calls `addrconf_del_dad_work(ifa)`.
- **Interface Coming Up (`addrconf_notify(NETDEV_UP)` -> `addrconf_permanent_addr` -> `fixup_permanent_addr`)**:
- `fixup_permanent_addr`:
- Checks `if (!ifp->rt || !ifp->rt->fib6_node)`:
- Reallocates route `f6i = addrconf_f6i_alloc(...)` and sets `ifp->rt = f6i;`.
- If `ifp->state == INET6_IFADDR_STATE_PREDAD`, calls `addrconf_dad_start(ifp);`.
- `addrconf_dad_work` runs:
- Sets state to `INET6_IFADDR_STATE_DAD`, calls `addrconf_dad_begin()`.
- In `addrconf_dad_begin()`:
- Checks `dev->flags & (IFF_NOARP | IFF_LOOPBACK)` or `ifp->flags & IFA_F_NODAD`.
- Calls `addrconf_dad_completed(ifp, bump_id, send_na)`.
- `addrconf_dad_completed` calls:
- `ipv6_ifa_notify(RTM_NEWADDR, ifp)`.
- In `__ipv6_ifa_notify(RTM_NEWADDR, ifp)`:
- If `ifp->rt && !rcu_access_pointer(ifp->rt->fib6_node)`, calls `ip6_ins_rt(net, ifp->rt)`.
- If `!ifp->rt && (ifp->idev->dev->flags & IFF_UP)`, calls `pr_warn("BUG: Address %pI6c on device %s is missing its host route.\n", ...)`.
#### 4. Active Hypotheses on How the Warning is Triggered
- **Hypothesis 1 (Race between interface up/down and DAD work)**:
- If `addrconf_dad_work` is already executing or queued when `addrconf_ifdown()` executes:
- `addrconf_del_dad_work` only cancels pending timer; if work already commenced or queues again.
- However, `addrconf_dad_work` and `addrconf_ifdown` both take `rtnl_lock` / `rtnl_net_lock`.
- **Hypothesis 2 (Interaction with multiple state changes / address modifications)**:
- Check whether `ifp->rt` is NULL while `IFF_UP` is set without `fixup_permanent_addr` being called, e.g.:
- Does `addrconf_permanent_addr` run before or after `IFF_UP` is visible?
- If the address was modified (`inet6_addr_modify`), or if `IFA_F_PERMANENT` was cleared or not present on the address when `keep_addr_on_down` is manipulated.
- When `lo` goes down and up, does `fixup_permanent_addr` fail or is there another path calling `ipv6_ifa_notify` where `ifp->rt == NULL` while `IFF_UP` is set?
- Need to check git history for commit that fixed or introduced this message or fixed this exact bug.
#### 5. Dimension Assessment Under Construction
- **Exploitable**: Currently looking like NO (pure `pr_warn` / missing route warning; no memory corruption, wild pointer, UAF, OOB, or info leak).
- **Denial of Service**: Currently looking like NO (it's a `pr_warn` message, rate of emission depends on user triggering it; does not crash or hang in production kernel). Need to confirm whether any crash follows.
- **Privilege / Capability Requirements**:
- `mount("./proc", ...)` - unprivileged user namespace or root.
- Writing to `/proc/sys/net/ipv6/conf/all/keep_addr_on_down` requires `CAP_NET_ADMIN` in the network namespace (or root netns).
- Adding netlink IPv6 address requires `CAP_NET_ADMIN`.
- `ioctl(SIOCSIFFLAGS)` requires `CAP_NET_ADMIN`.
- Accessible from unprivileged process: Likely NO.
- Accessible from user namespace: Likely YES (with user namespace and unshare -n).
#### 6. Next Steps & Instructions to Watch Out For
- Check git log for `"missing its host route"` using `git-log` or `grepper` to see recent fixes or commit discussions.
- Verify exact capability checks for `/proc/sys/net/ipv6/conf/*/keep_addr_on_down` and `SIOCSIFFLAGS` / netlink address adding.
- Confirm final classification dimensions and prepare arguments for `set-results`.
- Avoid repetitive searches on functions already inspected (`__ipv6_ifa_notify`, `addrconf_ifdown`, `addrconf_permanent_addr`).
Tokens:
input: 46463
output: 1953
thoughts: 0
|
| 53/2 |
2026/09/21 01:03 |
llm |
expert |
0m
Model:
Tokens:
input: 17368
output: 38
thoughts: 0
|
| 54/2 |
2026/09/21 01:03 |
tool |
git-log |
0m
Args: map[CodeRegexp:BUG: Address %pI6c on device %s is missing its host route Count:5]
Results: map[Output:b126f6f5940f Merge tag 'x86_mm_for_7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
]
|
| 55/2 |
2026/09/21 01:03 |
llm |
expert |
0m
Model:
Tokens:
input: 17472
output: 31
thoughts: 0
|
| 56/2 |
2026/09/21 01:03 |
tool |
git-log |
0m
Args: map[CodeRegexp:BUG: Address %pI6c on device Count:5]
Results: map[Output:b126f6f5940f Merge tag 'x86_mm_for_7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
]
|
| 57/2 |
2026/09/21 01:04 |
llm |
expert |
0m
Model:
Tokens:
input: 17569
output: 21
thoughts: 0
|
| 58/2 |
2026/09/21 01:04 |
tool |
git-log |
0m
Args: map[MessageRegexps:[missing its host route]]
Results:
|
| 59/2 |
2026/09/21 01:04 |
llm |
expert |
0m
Model:
Tokens:
input: 17603
output: 24
thoughts: 0
|
| 60/2 |
2026/09/21 01:04 |
tool |
git-log |
0m
Args: map[MessageRegexps:[keep_addr_on_down]]
Results:
|
| 61/2 |
2026/09/21 01:04 |
llm |
expert |
0m
Model:
Tokens:
input: 17640
output: 39
thoughts: 0
|
| 62/2 |
2026/09/21 01:04 |
tool |
git-log |
0m
Args: map[MessageRegexps:[keep_addr_on_down] PathPrefix:net/ipv6/addrconf.c]
Results:
|
| 63/2 |
2026/09/21 01:04 |
llm |
expert |
0m
Model:
Tokens:
input: 17692
output: 44
thoughts: 0
|
| 64/2 |
2026/09/21 01:04 |
tool |
git-log |
0m
Args: map[CodeRegexp:keep_addr_on_down Count:10 PathPrefix:net/ipv6/addrconf.c]
Results: map[Output:b126f6f5940f Merge tag 'x86_mm_for_7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
]
|
| 65/2 |
2026/09/21 01:04 |
llm |
expert |
0m
Model:
Tokens:
input: 17802
output: 38
thoughts: 114
Thoughts: **Investigating IPv6 Address Configuration in the Kernel**
Okay, so I need to find out the history of the `keep_addr_on_down` flag within the `net/ipv6/addrconf.c` file. My first instinct is to use `git log` and try a `CodeRegexp` search for that specific term. Ah, but that output is just showing me a merge commit! Not helpful. Alright, need to dig deeper. I'll switch tactics and use `git blame` or perhaps `git show` instead. Either should pinpoint the exact commit that introduced or last modified that particular flag. I also know that flag will be around line 6320 of that file, so I'll be sure to check that area.
|
| 66/2 |
2026/09/21 01:04 |
tool |
read-file |
0m
Args: map[File:net/ipv6/addrconf.c FirstLine:6300 LineCount:50]
Results: map[Contents:6300: struct net *net = dev_net(ifp->idev->dev);
6301:
6302: if (event)
6303: ASSERT_RTNL();
6304:
6305: inet6_ifa_notify(event ? : RTM_NEWADDR, ifp);
6306:
6307: switch (event) {
6308: case RTM_NEWADDR:
6309: /*
6310: * If the address was optimistic we inserted the route at the
6311: * start of our DAD process, so we don't need to do it again.
6312: * If the device was taken down in the middle of the DAD
6313: * cycle there is a race where we could get here without a
6314: * host route, so nothing to insert. That will be fixed when
6315: * the device is brought up.
6316: */
6317: if (ifp->rt && !rcu_access_pointer(ifp->rt->fib6_node)) {
6318: ip6_ins_rt(net, ifp->rt);
6319: } else if (!ifp->rt && (ifp->idev->dev->flags & IFF_UP)) {
6320: pr_warn("BUG: Address %pI6c on device %s is missing its host route.\n",
6321: &ifp->addr, ifp->idev->dev->name);
6322: }
6323:
6324: if (ifp->idev->cnf.forwarding)
6325: addrconf_join_anycast(ifp);
6326: if (!ipv6_addr_any(&ifp->peer_addr))
6327: addrconf_prefix_route(&ifp->peer_addr, 128,
6328: ifp->rt_priority, ifp->idev->dev,
6329: 0, 0, GFP_ATOMIC);
6330: break;
6331: case RTM_DELADDR:
6332: if (ifp->idev->cnf.forwarding)
6333: addrconf_leave_anycast(ifp);
6334: addrconf_leave_solict(ifp->idev, &ifp->addr);
6335: if (!ipv6_addr_any(&ifp->peer_addr)) {
6336: struct fib6_info *rt;
6337:
6338: rt = addrconf_get_prefix_route(&ifp->peer_addr, 128,
6339: ifp->idev->dev, 0, 0,
6340: false);
6341: if (rt)
6342: ip6_del_rt(net, rt, false);
6343: }
6344: if (ifp->rt) {
6345: ip6_del_rt(net, ifp->rt, false);
6346: ifp->rt = NULL;
6347: }
6348: rt_genid_bump_ipv6(net);
6349: break;
]
|
| 67/2 |
2026/09/21 01:04 |
llm |
expert |
0m
Model:
Tokens:
input: 18983
output: 39
thoughts: 22
Thoughts: Here's my take on those thoughts:
**Analyzing a Warning**
Okay, so there's a warning, and it's flagged at line 6320. My first instinct, as always, is to understand the context and the root cause. This likely indicates some potential issue β perhaps a deprecated function, a performance bottleneck, a potential security vulnerability, or even a subtle logic error. The line number is my initial point of attack. Now, I need to understand who last touched this code and, more importantly, *why*. Time to check the blame history for that line. Understanding the evolution of that particular line of code, and the surrounding changes, will paint a clearer picture of the warning's significance. Let's see who's responsible for this particular section of code and analyze their rationale for writing it.
|
| 68/2 |
2026/09/21 01:05 |
tool |
git-blame |
0m
Args: map[End:6325 File:net/ipv6/addrconf.c Start:6315]
Results: map[Output:^b126f6f5940f 6315) * the device is brought up.
^b126f6f5940f 6316) */
^b126f6f5940f 6317) if (ifp->rt && !rcu_access_pointer(ifp->rt->fib6_node)) {
^b126f6f5940f 6318) ip6_ins_rt(net, ifp->rt);
^b126f6f5940f 6319) } else if (!ifp->rt && (ifp->idev->dev->flags & IFF_UP)) {
^b126f6f5940f 6320) pr_warn("BUG: Address %pI6c on device %s is missing its host route.\n",
^b126f6f5940f 6321) &ifp->addr, ifp->idev->dev->name);
^b126f6f5940f 6322) }
^b126f6f5940f 6323)
^b126f6f5940f 6324) if (ifp->idev->cnf.forwarding)
^b126f6f5940f 6325) addrconf_join_anycast(ifp);
]
|
| 69/2 |
2026/09/21 01:05 |
llm |
expert |
0m
Model:
Tokens:
input: 19607
output: 31
thoughts: 255
Thoughts: **Analyzing a Confusing Commit Hash**
Okay, so I'm looking at this commit hash, `^b126f6f5940f`. Initially, I thought that this was the root, but the `^` threw me off. Now I recall, the `^` means it's a boundary commit - something that predates the current history or a merge commit we can't trace back easily. But actually, `^` is not relevant, it's just the full commit hash.
I had the urge to check the commit message for `b126f6f5940f` to understand its relevance. However, that didn't provide any context, so I checked the `git log` output again.
The issue was, the `git log` output was only returning the *latest* commit, probably because I didn't give the command enough parameters, or it was matching everything.
I should be using `git log` with a search term, like `-S "BUG: Address %pI6c on device %s is missing its host route."` or something similar, to find the specific commit or commits related to the bug.
|
| 70/2 |
2026/09/21 01:05 |
tool |
grepper |
0m
Args: map[Expression:BUG: Address %pI6c on device %s is missing its host route]
Results: map[Output:net/ipv6/addrconf.c=6298=static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
--
net/ipv6/addrconf.c-6319- } else if (!ifp->rt && (ifp->idev->dev->flags & IFF_UP)) {
net/ipv6/addrconf.c:6320: pr_warn("BUG: Address %pI6c on device %s is missing its host route.\n",
net/ipv6/addrconf.c-6321- &ifp->addr, ifp->idev->dev->name);
]
|
| 71/2 |
2026/09/21 01:05 |
llm |
expert |
0m
Model:
Tokens:
input: 20313
output: 47
thoughts: 11
Thoughts: Okay, here's my interpretation of that thought process, assuming I'm an expert in this field and approaching code:
**Diving into the History of This Line**
Right, let's get down to brass tacks. I'm looking at this particular line of code, and it's making me raise an eyebrow. Something about it feels⦠off. Before I start jumping to conclusions or tweaking things, the first, and frankly the most efficient, step is always to understand *why* this line is even here in the first place. I need context.
So, my immediate thought is to trace this back. Where did this come from? What commit introduced this specific piece of logic? Finding that initial commit is going to give me the roadmap. Itβll tell me the original intent, the problem we were trying to solve, and likely reveal the discussions or reasoning behind the implementation. This is going to save me a ton of guesswork and possible misinterpretations down the line. It's the best way to determine if this line is still relevant, if it's been updated to solve the appropriate issue, or if there's a better approach nowadays.
|
| 72/2 |
2026/09/21 01:05 |
tool |
git-log |
0m
Args: map[CodeRegexp:BUG: Address %pI6c on device Count:10 PathPrefix:net/ipv6/addrconf.c]
Results: map[Output:b126f6f5940f Merge tag 'x86_mm_for_7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
]
|
| 73/2 |
2026/09/21 01:05 |
llm |
expert |
0m
Model:
Tokens:
input: 20679
output: 43
thoughts: 156
Thoughts: **Investigating the Latest IPv6 Address Configuration Bug**
Okay, so `git log` with that `CodeRegexp` thing wasn't exactly what I was hoping for; it just seems to be giving me the very latest commit. I could manually run `git log -G "BUG: Address %pI6c on device" net/ipv6/addrconf.c` via `grepper`... wait, no, `grepper` is just a wrapper for `git grep`. Not what I'm looking for.
Alright, let's try `git show` on that commit, `b126f6f5940f`... Hmm, that's just the current head, that doesn't help. I need to dig deeper.
Right, I'll go back to `git log`, but this time I'll be much more specific: I'll try searching for the symbol `__ipv6_ifa_notify` specifically within `net/ipv6/addrconf.c`. That should give me the relevant commits, I hope! This is definitely the right approach.
|
| 74/2 |
2026/09/21 01:05 |
tool |
git-log |
0m
Args: map[Count:10 SourcePath:net/ipv6/addrconf.c SymbolName:__ipv6_ifa_notify]
Results: map[Output:b126f6f5940f Merge tag 'x86_mm_for_7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
]
|
| 75/2 |
2026/09/21 01:05 |
llm |
expert |
0m
Model:
Tokens:
input: 21179
output: 31
thoughts: 204
Thoughts: **Debugging a Git Log Output**
Okay, so I'm getting really confused. Why is `git-log` consistently returning `b126f6f5940f` for *everything* I'm asking it? My initial thought was that either the tool is broken, or I'm misinterpreting the output. That's always a possibility. Let's step back and look at the tool description again.
Right, the description says it executes `git log` on the kernel sources and *returns the output*. If it's returning `b126f6f5940f Merge tag 'x86_mm_for_7.3-rc1'...`, then that *is* the output. But that's just... one line? Is the output truncated? Is it just displaying the first line? Or is that *literally* all it's getting?
Ah, the lightbulb! The tool just returns *the raw output* of `git log`. Is it possible the tool is using the `--oneline` option? No, it's not the case because it does show the entire text. It's just literally returning that one line.
Well, that's odd, but let's see if we can get anything useful out of that commit with `git-show`. Hopefully I can get more context from that.
|
| 76/2 |
2026/09/21 01:05 |
tool |
git-show |
0m
Args: map[Commit:b126f6f5940f Stat:true]
Results: map[Output:commit b126f6f5940f614cc06bba61c77dec2d75e8ceaf
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Tue Aug 18 17:44:09 2026 -0700
Merge tag 'x86_mm_for_7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 mm updates from Dave Hansen:
"There are two things in here of note. First, there are fixes to reduce
the time that the TLB flushing code sits around with interrupts
disabled. It should be well tested, but it's certainly something to
keep an eye on.
Second is a little back-and-forth in the interactions between the
set_memory*() locking and DEBUG_PAGEALLOC. There was a slightly
painful re-discovery of why DEBUG_PAGEALLOC has special locking rules,
but the code did end up better for it.
Summary:
- Fix pkey_alloc() return value when pkeys are not supported
- Allow preemption during IPI completion waiting to improve wakeup
latency
- Convert more x86 page table code to ptdescs
- Fixes and cleanups for set_memory*() locking, mostly around large
pages"
* tag 'x86_mm_for_7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/pkeys: Fix pkey_alloc() return value when pkeys are not supported
x86/mm: Fix and document DEBUG_PAGEALLOC
x86/mm: Use guard() for pgd_lock
x86/mm: Use guard() in cpa_collapse_large_pages()
x86/mm: Re-enable preemption before flush_tlb_multi()
x86/kvm: Disable preemption in kvm_flush_tlb_multi()
x86/mm: Move flush_tlb_info back to the stack
x86/mm: Cap flush_tlb_info alignment at 64 bytes
x86/mm: Factor out flush_tlb_info initialization
x86/mm/pat: Take cpa_lock around large-page collapse
x86/mm/pat: Don't gate cpa_lock on debug_pagealloc_enabled()
x86/xen: Convert xen_mm_unpin_all() to ptdescs
x86/xen: Convert xen_mm_pin_all() to ptdescs
x86/mm: Convert pgd_page_get_mm() to ptdescs
x86/mm: Convert sync_global_pgds_l4() to ptdescs
x86/mm: Convert sync_global_pgds_l5() to ptdescs
x86/mm: Convert arch_sync_kernel_mappings() to ptdescs
x86/mm/pat: Convert collapse_pmd_page() to ptdescs
x86/mm/pat: Convert __set_pmd_pte() to ptdescs
x86/mm/pat: Use IS_ENABLED() instead of ifdef
.clang-format | 808 +
.clippy.toml | 21 +
.cocciconfig | 3 +
.editorconfig | 27 +
.get_maintainer.ignore | 8 +
.gitattributes | 5 +
.gitignore | 196 +
.mailmap | 971 +
.pylintrc | 2 +
.rustfmt.toml | 12 +
COPYING | 20 +
CREDITS | 4608 +
Documentation/.gitignore | 3 +
Documentation/.renames.txt | 1185 +
Documentation/ABI/README | 98 +
.../ABI/obsolete/automount-tracefs-debugfs | 20 +
Documentation/ABI/obsolete/o2cb | 11 +
Documentation/ABI/obsolete/procfs-i8k | 10 +
Documentation/ABI/obsolete/sysfs-bus-iio | 174 +
Documentation/ABI/obsolete/sysfs-bus-usb | 31 +
Documentation/ABI/obsolete/sysfs-class-typec | 48 +
Documentation/ABI/obsolete/sysfs-cpuidle | 9 +
.../ABI/obsolete/sysfs-driver-hid-roccat-arvo | 53 +
.../ABI/obsolete/sysfs-driver-hid-roccat-isku | 153 +
.../ABI/obsolete/sysfs-driver-hid-roccat-koneplus | 145 +
.../ABI/obsolete/sysfs-driver-hid-roccat-konepure | 105 +
.../ABI/obsolete/sysfs-driver-hid-roccat-kovaplus | 116 +
.../ABI/obsolete/sysfs-driver-hid-roccat-lua | 7 +
.../ABI/obsolete/sysfs-driver-hid-roccat-pyra | 126 +
.../ABI/obsolete/sysfs-driver-hid-roccat-ryos | 178 +
.../ABI/obsolete/sysfs-driver-hid-roccat-savu | 77 +
.../ABI/obsolete/sysfs-driver-intel_pmc_bxt | 22 +
Documentation/ABI/obsolete/sysfs-driver-ivpu | 30 +
.../ABI/obsolete/sysfs-driver-samsung-laptop | 10 +
Documentation/ABI/obsolete/sysfs-firmware-acpi | 8 +
Documentation/ABI/obsolete/sysfs-gpio | 40 +
.../ABI/obsolete/sysfs-kernel-fadump_enabled | 9 +
.../ABI/obsolete/sysfs-kernel-fadump_registered | 10 +
.../ABI/obsolete/sysfs-kernel-fadump_release_mem | 10 +
.../ABI/obsolete/sysfs-kernel-kexec-kdump | 71 +
.../ABI/obsolete/sysfs-platform-ideapad-laptop | 8 +
Documentation/ABI/removed/devfs | 13 +
Documentation/ABI/removed/dv1394 | 14 +
Documentation/ABI/removed/ip_queue | 9 +
Documentation/ABI/removed/net_dma | 8 +
Documentation/ABI/removed/o2cb | 10 +
Documentation/ABI/removed/raw1394 | 16 +
Documentation/ABI/removed/sysfs-bus-nfit | 17 +
Documentation/ABI/removed/sysfs-class-cxl | 272 +
Documentation/ABI/removed/sysfs-class-rfkill | 13 +
Documentation/ABI/removed/sysfs-firmware-efi-vars | 12 +
.../removed/sysfs-kernel-fadump_release_opalcore | 9 +
Documentation/ABI/removed/sysfs-kernel-uids | 14 +
Documentation/ABI/removed/sysfs-mce | 37 +
.../ABI/removed/sysfs-selinux-checkreqprot | 26 +
Documentation/ABI/removed/sysfs-selinux-disable | 29 +
Documentation/ABI/removed/sysfs-selinux-user | 12 +
Documentation/ABI/removed/video1394 | 17 +
Documentation/ABI/stable/firewire-cdev | 111 +
Documentation/ABI/stable/o2cb | 10 +
Documentation/ABI/stable/procfs-audit_loginuid | 27 +
Documentation/ABI/stable/syscalls | 10 +
Documentation/ABI/stable/sysfs-acpi-pmprofile | 28 +
Documentation/ABI/stable/sysfs-block | 941 +
Documentation/ABI/stable/sysfs-bus-firewire | 136 +
Documentation/ABI/stable/sysfs-bus-fsl-mc | 19 +
Documentation/ABI/stable/sysfs-bus-mhi | 44 +
Documentation/ABI/stable/sysfs-bus-nvmem | 50 +
Documentation/ABI/stable/sysfs-bus-usb | 142 +
Documentation/ABI/stable/sysfs-bus-vmbus | 187 +
Documentation/ABI/stable/sysfs-bus-w1 | 12 +
Documentation/ABI/stable/sysfs-bus-xen-backend | 84 +
Documentation/ABI/stable/sysfs-class-backlight | 63 +
Documentation/ABI/stable/sysfs-class-bluetooth | 9 +
Documentation/ABI/stable/sysfs-class-infiniband | 784 +
Documentation/ABI/stable/sysfs-class-rfkill | 93 +
Documentation/ABI/stable/sysfs-class-tpm | 210 +
Documentation/ABI/stable/sysfs-class-ubi | 221 +
Documentation/ABI/stable/sysfs-class-udc | 93 +
Documentation/ABI/stable/sysfs-devices | 32 +
Documentation/ABI/stable/sysfs-devices-node | 238 +
Documentation/ABI/stable/sysfs-devices-system-cpu | 117 +
.../ABI/stable/sysfs-devices-system-xen_memory | 86 +
Documentation/ABI/stable/sysfs-driver-aspeed-vuart | 24 +
Documentation/ABI/stable/sysfs-driver-dma-idxd | 376 +
Documentation/ABI/stable/sysfs-driver-dma-ioatdma | 30 +
.../ABI/stable/sysfs-driver-firmware-zynqmp | 256 +
Documentation/ABI/stable/sysfs-driver-ib_srp | 192 +
Documentation/ABI/stable/sysfs-driver-misc-cp500 | 25 +
Documentation/ABI/stable/sysfs-driver-mlxreg-io | 815 +
Documentation/ABI/stable/sysfs-driver-qaic | 19 +
Documentation/ABI/stable/sysfs-driver-qla2xxx | 8 +
Documentation/ABI/stable/sysfs-driver-speakup | 394 +
Documentation/ABI/stable/sysfs-driver-usb-usbtmc | 27 +
Documentation/ABI/stable/sysfs-driver-w1_ds2438 | 13 +
Documentation/ABI/stable/sysfs-driver-w1_ds28e04 | 15 +
Documentation/ABI/stable/sysfs-driver-w1_ds28ea00 | 6 +
Documentation/ABI/stable/sysfs-firmware-opal-dump | 46 +
Documentation/ABI/stable/sysfs-firmware-opal-elog | 62 +
Documentation/ABI/stable/sysfs-fs-orangefs | 87 +
Documentation/ABI/stable/sysfs-hypervisor-xen | 135 +
Documentation/ABI/stable/sysfs-kernel-notes | 5 +
.../ABI/stable/sysfs-kernel-time-aux-clocks | 5 +
Documentation/ABI/stable/sysfs-module | 47 +
Documentation/ABI/stable/sysfs-platform-wmi-bmof | 7 +
Documentation/ABI/stable/sysfs-transport-srp | 58 +
Documentation/ABI/stable/thermal-notification | 4 +
Documentation/ABI/stable/vdso | 37 +
Documentation/ABI/testing/configfs-acpi | 52 +
Documentation/ABI/testing/configfs-iio | 34 +
Documentation/ABI/testing/configfs-most | 241 +
Documentation/ABI/testing/configfs-rdma_cm | 30 +
.../ABI/testing/configfs-spear-pcie-gadget | 33 +
Documentation/ABI/testing/configfs-stp-policy | 48 +
.../ABI/testing/configfs-stp-policy-p_sys-t | 41 +
.../ABI/testing/configfs-thunderbolt_stream | 83 +
Documentation/ABI/testing/configfs-tsm-report | 161 +
Documentation/ABI/testing/configfs-usb-gadget | 158 +
Documentation/ABI/testing/configfs-usb-gadget-acm | 15 +
Documentation/ABI/testing/configfs-usb-gadget-ecm | 20 +
Documentation/ABI/testing/configfs-usb-gadget-eem | 16 +
Documentation/ABI/testing/configfs-usb-gadget-ffs | 17 +
Documentation/ABI/testing/configfs-usb-gadget-hid | 13 +
.../ABI/testing/configfs-usb-gadget-loopback | 10 +
.../ABI/testing/configfs-usb-gadget-mass-storage | 41 +
Documentation/ABI/testing/configfs-usb-gadget-midi | 15 +
.../ABI/testing/configfs-usb-gadget-midi2 | 54 +
Documentation/ABI/testing/configfs-usb-gadget-ncm | 15 +
Documentation/ABI/testing/configfs-usb-gadget-obex | 9 +
.../ABI/testing/configfs-usb-gadget-phonet | 8 +
.../ABI/testing/configfs-usb-gadget-printer | 11 +
.../ABI/testing/configfs-usb-gadget-rndis | 19 +
.../ABI/testing/configfs-usb-gadget-serial | 9 +
.../ABI/testing/configfs-usb-gadget-sourcesink | 16 +
.../ABI/testing/configfs-usb-gadget-subset | 16 +
Documentation/ABI/testing/configfs-usb-gadget-tcm | 6 +
Documentation/ABI/testing/configfs-usb-gadget-uac1 | 41 +
.../ABI/testing/configfs-usb-gadget-uac1_legacy | 12 +
Documentation/ABI/testing/configfs-usb-gadget-uac2 | 51 +
Documentation/ABI/testing/configfs-usb-gadget-uvc | 438 +
Documentation/ABI/testing/debugfs-alienware-wmi | 64 +
Documentation/ABI/testing/debugfs-amd-iommu | 131 +
Documentation/ABI/testing/debugfs-cec-error-inj | 40 +
Documentation/ABI/testing/debugfs-cros-ec | 78 +
Documentation/ABI/testing/debugfs-cxl | 157 +
Documentation/ABI/testing/debugfs-dell-wmi-ddv | 34 +
Documentation/ABI/testing/debugfs-driver-dcc | 127 +
Documentation/ABI/testing/debugfs-driver-genwqe | 91 +
.../ABI/testing/debugfs-driver-habanalabs | 323 +
Documentation/ABI/testing/debugfs-driver-qat | 109 +
.../ABI/testing/debugfs-driver-qat_telemetry | 259 +
Documentation/ABI/testing/debugfs-dwc-pcie | 157 +
Documentation/ABI/testing/debugfs-ec | 21 +
Documentation/ABI/testing/debugfs-hisi-hpre | 200 +
Documentation/ABI/testing/debugfs-hisi-migration | 25 +
Documentation/ABI/testing/debugfs-hisi-sec | 173 +
Documentation/ABI/testing/debugfs-hisi-zip | 174 +
Documentation/ABI/testing/debugfs-hyperv | 23 +
Documentation/ABI/testing/debugfs-ideapad | 19 +
Documentation/ABI/testing/debugfs-iio-ad9467 | 39 +
Documentation/ABI/testing/debugfs-iio-backend | 20 +
Documentation/ABI/testing/debugfs-intel-iommu | 276 +
Documentation/ABI/testing/debugfs-moxtet | 35 +
Documentation/ABI/testing/debugfs-msi-wmi-platform | 14 +
Documentation/ABI/testing/debugfs-olpc | 16 +
Documentation/ABI/testing/debugfs-pcie-ptm | 70 +
Documentation/ABI/testing/debugfs-pfo-nx-crypto | 45 +
Documentation/ABI/testing/debugfs-scmi | 70 +
Documentation/ABI/testing/debugfs-scmi-raw | 208 +
Documentation/ABI/testing/debugfs-tpmi | 40 +
Documentation/ABI/testing/debugfs-vfio | 57 +
Documentation/ABI/testing/debugfs-wilco-ec | 45 +
Documentation/ABI/testing/dell-smbios-wmi | 41 +
Documentation/ABI/testing/dev-kmsg | 127 +
Documentation/ABI/testing/devlink-resource-mlxsw | 33 +
Documentation/ABI/testing/evm | 109 +
Documentation/ABI/testing/gpio-cdev | 28 +
Documentation/ABI/testing/ima_policy | 193 +
Documentation/ABI/testing/ppc-memtrace | 46 +
Documentation/ABI/testing/procfs-attr-current | 20 +
Documentation/ABI/testing/procfs-attr-exec | 20 +
Documentation/ABI/testing/procfs-attr-prev | 19 +
Documentation/ABI/testing/procfs-diskstats | 43 +
Documentation/ABI/testing/procfs-smaps_rollup | 42 +
Documentation/ABI/testing/pstore | 47 +
Documentation/ABI/testing/rtc-cdev | 50 +
Documentation/ABI/testing/securityfs-secrets-coco | 51 +
Documentation/ABI/testing/sysfs-amd-pmc | 13 +
Documentation/ABI/testing/sysfs-amd-pmf | 13 +
Documentation/ABI/testing/sysfs-ata | 140 +
.../ABI/testing/sysfs-auxdisplay-linedisp | 90 +
Documentation/ABI/testing/sysfs-block-aoe | 45 +
Documentation/ABI/testing/sysfs-block-bcache | 149 +
Documentation/ABI/testing/sysfs-block-device | 119 +
Documentation/ABI/testing/sysfs-block-dm | 47 +
Documentation/ABI/testing/sysfs-block-loop | 50 +
Documentation/ABI/testing/sysfs-block-rnbd | 64 +
Documentation/ABI/testing/sysfs-block-rssd | 5 +
Documentation/ABI/testing/sysfs-block-zram | 166 +
Documentation/ABI/testing/sysfs-bus-acpi | 98 +
Documentation/ABI/testing/sysfs-bus-amba | 20 +
Documentation/ABI/testing/sysfs-bus-auxiliary | 9 +
Documentation/ABI/testing/sysfs-bus-bcma | 31 +
Documentation/ABI/testing/sysfs-bus-cdx | 121 +
Documentation/ABI/testing/sysfs-bus-coreboot | 45 +
.../ABI/testing/sysfs-bus-coresight-devices-cti | 247 +
.../sysfs-bus-coresight-devices-dummy-source | 21 +
.../ABI/testing/sysfs-bus-coresight-devices-etb10 | 88 +
.../ABI/testing/sysfs-bus-coresight-devices-etm3x | 328 +
.../ABI/testing/sysfs-bus-coresight-devices-etm4x | 532 +
.../ABI/testing/sysfs-bus-coresight-devices-funnel | 18 +
.../ABI/testing/sysfs-bus-coresight-devices-stm | 59 +
.../ABI/testing/sysfs-bus-coresight-devices-tmc | 115 +
.../ABI/testing/sysfs-bus-coresight-devices-tpda | 69 +
.../ABI/testing/sysfs-bus-coresight-devices-tpdm | 290 +
.../ABI/testing/sysfs-bus-coresight-devices-trbe | 20 +
.../testing/sysfs-bus-coresight-devices-ultra_smb | 31 +
Documentation/ABI/testing/sysfs-bus-counter | 477 +
Documentation/ABI/testing/sysfs-bus-css | 56 +
Documentation/ABI/testing/sysfs-bus-cxl | 639 +
Documentation/ABI/testing/sysfs-bus-dax | 153 +
Documentation/ABI/testing/sysfs-bus-dfl | 17 +
.../ABI/testing/sysfs-bus-dfl-devices-emif | 25 +
.../ABI/testing/sysfs-bus-dfl-devices-n3000-nios | 47 +
.../ABI/testing/sysfs-bus-event_source-devices | 24 +
.../testing/sysfs-bus-event_source-devices-caps | 24 +
.../testing/sysfs-bus-event_source-devices-dfl_fme | 104 +
.../ABI/testing/sysfs-bus-event_source-devices-dsa | 30 +
.../testing/sysfs-bus-event_source-devices-events | 102 +
.../testing/sysfs-bus-event_source-devices-format | 21 +
.../sysfs-bus-event_source-devices-hisi_ptt | 113 +
.../testing/sysfs-bus-event_source-devices-hv_24x7 | 98 +
.../testing/sysfs-bus-event_source-devices-hv_gpci | 242 +
.../testing/sysfs-bus-event_source-devices-iommu | 37 +
.../testing/sysfs-bus-event_source-devices-rdpmc | 44 +
.../testing/sysfs-bus-event_source-devices-uncore | 13 +
.../testing/sysfs-bus-event_source-devices-vpa-dtl | 25 +
.../testing/sysfs-bus-event_source-devices-vpa-pmu | 25 +
Documentation/ABI/testing/sysfs-bus-fcoe | 138 +
Documentation/ABI/testing/sysfs-bus-fsi | 46 +
.../ABI/testing/sysfs-bus-fsi-devices-sbefifo | 10 +
Documentation/ABI/testing/sysfs-bus-fsl-mc | 25 +
Documentation/ABI/testing/sysfs-bus-hsi | 19 +
.../ABI/testing/sysfs-bus-i2c-devices-bq32k | 7 +
.../ABI/testing/sysfs-bus-i2c-devices-fsa9480 | 27 +
.../ABI/testing/sysfs-bus-i2c-devices-hm6352 | 21 +
.../ABI/testing/sysfs-bus-i2c-devices-lm3533 | 15 +
.../ABI/testing/sysfs-bus-i2c-devices-m24lr | 100 +
.../ABI/testing/sysfs-bus-i2c-devices-pca954x | 23 +
.../testing/sysfs-bus-i2c-devices-turris-omnia-mcu | 113 +
Documentation/ABI/testing/sysfs-bus-i3c | 194 +
Documentation/ABI/testing/sysfs-bus-iio | 2498 +
.../ABI/testing/sysfs-bus-iio-accel-adxl372 | 7 +
.../ABI/testing/sysfs-bus-iio-accel-bmc150 | 7 +
Documentation/ABI/testing/sysfs-bus-iio-ad9739a | 19 +
.../ABI/testing/sysfs-bus-iio-adc-ad-sigma-delta | 23 +
Documentation/ABI/testing/sysfs-bus-iio-adc-ad4130 | 20 +
Documentation/ABI/testing/sysfs-bus-iio-adc-ad7192 | 27 +
.../ABI/testing/sysfs-bus-iio-adc-ad7280a | 13 +
.../testing/sysfs-bus-iio-adc-envelope-detector | 39 +
Documentation/ABI/testing/sysfs-bus-iio-adc-hi8435 | 48 +
.../ABI/testing/sysfs-bus-iio-adc-max11410 | 13 +
.../ABI/testing/sysfs-bus-iio-adc-mcp3564 | 53 +
Documentation/ABI/testing/sysfs-bus-iio-adc-mt6360 | 78 +
.../ABI/testing/sysfs-bus-iio-adc-pac1934 | 9 +
Documentation/ABI/testing/sysfs-bus-iio-adc-stm32 | 21 +
Documentation/ABI/testing/sysfs-bus-iio-bno055 | 81 +
Documentation/ABI/testing/sysfs-bus-iio-cdc-ad7746 | 11 +
.../ABI/testing/sysfs-bus-iio-chemical-sgp40 | 17 +
.../ABI/testing/sysfs-bus-iio-chemical-sunrise-co2 | 38 +
.../ABI/testing/sysfs-bus-iio-chemical-vz89x | 7 +
Documentation/ABI/testing/sysfs-bus-iio-cros-ec | 21 +
Documentation/ABI/testing/sysfs-bus-iio-dac | 61 +
Documentation/ABI/testing/sysfs-bus-iio-dac-ad5766 | 31 +
.../ABI/testing/sysfs-bus-iio-dac-dpot-dac | 8 +
.../ABI/testing/sysfs-bus-iio-dac-ltc2688 | 55 +
.../ABI/testing/sysfs-bus-iio-dfsdm-adc-stm32 | 22 +
.../ABI/testing/sysfs-bus-iio-distance-srf08 | 17 +
Documentation/ABI/testing/sysfs-bus-iio-dma-buffer | 19 +
.../ABI/testing/sysfs-bus-iio-filter-admv8818 | 18 +
.../ABI/testing/sysfs-bus-iio-frequency-ad9523 | 31 +
.../ABI/testing/sysfs-bus-iio-frequency-adf4350 | 21 +
.../ABI/testing/sysfs-bus-iio-frequency-adf4371 | 11 +
.../ABI/testing/sysfs-bus-iio-frequency-admv1013 | 38 +
.../ABI/testing/sysfs-bus-iio-frequency-admv1014 | 23 +
.../ABI/testing/sysfs-bus-iio-gyro-bmg160 | 7 +
.../ABI/testing/sysfs-bus-iio-health-afe440x | 39 +
Documentation/ABI/testing/sysfs-bus-iio-humidity | 10 +
.../sysfs-bus-iio-impedance-analyzer-ad5933 | 35 +
Documentation/ABI/testing/sysfs-bus-iio-ina2xx-adc | 15 +
.../ABI/testing/sysfs-bus-iio-inv_icm42600 | 18 +
Documentation/ABI/testing/sysfs-bus-iio-isl29501 | 47 +
.../ABI/testing/sysfs-bus-iio-light-isl29018 | 21 +
.../ABI/testing/sysfs-bus-iio-light-lm3533-als | 56 +
.../ABI/testing/sysfs-bus-iio-light-si1133 | 22 +
.../ABI/testing/sysfs-bus-iio-light-tsl2583 | 20 +
.../ABI/testing/sysfs-bus-iio-light-tsl2772 | 13 +
.../ABI/testing/sysfs-bus-iio-magnetometer-hmc5843 | 20 +
Documentation/ABI/testing/sysfs-bus-iio-meas-spec | 7 +
Documentation/ABI/testing/sysfs-bus-iio-mpu6050 | 13 +
.../testing/sysfs-bus-iio-potentiometer-mcp4531 | 8 +
Documentation/ABI/testing/sysfs-bus-iio-proximity | 24 +
.../ABI/testing/sysfs-bus-iio-proximity-as3935 | 15 +
.../ABI/testing/sysfs-bus-iio-resolver-ad2s1210 | 27 +
Documentation/ABI/testing/sysfs-bus-iio-sps30 | 28 +
Documentation/ABI/testing/sysfs-bus-iio-sx9310 | 10 +
Documentation/ABI/testing/sysfs-bus-iio-sx9324 | 29 +
.../ABI/testing/sysfs-bus-iio-thermocouple | 18 +
.../ABI/testing/sysfs-bus-iio-timer-stm32 | 143 +
.../ABI/testing/sysfs-bus-iio-trigger-sysfs | 42 +
Documentation/ABI/testing/sysfs-bus-iio-vf610 | 16 +
.../ABI/testing/sysfs-bus-intel_th-devices-gth | 52 +
.../ABI/testing/sysfs-bus-intel_th-devices-msc | 54 +
.../ABI/testing/sysfs-bus-intel_th-devices-pti | 24 +
.../ABI/testing/sysfs-bus-intel_th-output-devices | 15 +
Documentation/ABI/testing/sysfs-bus-mcb | 29 +
Documentation/ABI/testing/sysfs-bus-mdio | 72 +
Documentation/ABI/testing/sysfs-bus-media | 6 +
Documentation/ABI/testing/sysfs-bus-mei | 56 +
Documentation/ABI/testing/sysfs-bus-mmc | 4 +
Documentation/ABI/testing/sysfs-bus-most | 299 +
Documentation/ABI/testing/sysfs-bus-moxtet-devices | 17 +
Documentation/ABI/testing/sysfs-bus-nfit | 233 +
Documentation/ABI/testing/sysfs-bus-nvdimm | 59 +
Documentation/ABI/testing/sysfs-bus-optee-devices | 17 +
Documentation/ABI/testing/sysfs-bus-papr-pmem | 75 +
Documentation/ABI/testing/sysfs-bus-pci | 704 +
.../ABI/testing/sysfs-bus-pci-devices-aer | 163 +
.../ABI/testing/sysfs-bus-pci-devices-avs | 8 +
.../ABI/testing/sysfs-bus-pci-devices-catpt | 17 +
.../ABI/testing/sysfs-bus-pci-devices-cciss | 80 +
.../ABI/testing/sysfs-bus-pci-devices-pvpanic | 26 +
.../ABI/testing/sysfs-bus-pci-drivers-ehci_hcd | 46 +
.../ABI/testing/sysfs-bus-pci-drivers-janz-cmodio | 8 +
.../ABI/testing/sysfs-bus-pci-drivers-xhci_hcd | 129 +
Documentation/ABI/testing/sysfs-bus-peci | 16 +
Documentation/ABI/testing/sysfs-bus-platform | 56 +
.../sysfs-bus-platform-devices-ampere-smpro | 325 +
.../testing/sysfs-bus-platform-devices-occ-hwmon | 13 +
.../sysfs-bus-platform-drivers-amd_x3d_vcache | 12 +
.../ABI/testing/sysfs-bus-platform-onboard-usb-dev | 9 +
Documentation/ABI/testing/sysfs-bus-rapidio | 201 +
Documentation/ABI/testing/sysfs-bus-rbd | 173 +
Documentation/ABI/testing/sysfs-bus-rpmsg | 95 +
Documentation/ABI/testing/sysfs-bus-siox | 90 +
.../ABI/testing/sysfs-bus-soundwire-master | 23 +
.../ABI/testing/sysfs-bus-soundwire-slave | 109 +
.../ABI/testing/sysfs-bus-spi-devices-spi-nor | 40 +
.../testing/sysfs-bus-surface_aggregator-tabletsw | 57 +
Documentation/ABI/testing/sysfs-bus-thunderbolt | 370 +
Documentation/ABI/testing/sysfs-bus-typec | 51 +
Documentation/ABI/testing/sysfs-bus-usb | 607 +
.../ABI/testing/sysfs-bus-usb-devices-usbsevseg | 46 +
Documentation/ABI/testing/sysfs-bus-usb-lvstest | 60 +
Documentation/ABI/testing/sysfs-bus-vdpa | 57 +
Documentation/ABI/testing/sysfs-bus-vfio-mdev | 113 +
Documentation/ABI/testing/sysfs-bus-vmbus | 21 +
Documentation/ABI/testing/sysfs-bus-wmi | 81 +
Documentation/ABI/testing/sysfs-c2port | 81 +
Documentation/ABI/testing/sysfs-cfq-target-latency | 8 +
Documentation/ABI/testing/sysfs-class | 16 +
Documentation/ABI/testing/sysfs-class-backlight | 186 +
.../testing/sysfs-class-backlight-driver-lm3533 | 54 +
.../ABI/testing/sysfs-class-backlight-lm3639 | 11 +
Documentation/ABI/testing/sysfs-class-bdi | 134 +
Documentation/ABI/testing/sysfs-class-bsr | 25 +
Documentation/ABI/testing/sysfs-class-chromeos | 53 +
.../sysfs-class-chromeos-driver-cros-ec-lightbar | 74 +
.../sysfs-class-chromeos-driver-cros-ec-vbc | 6 +
Documentation/ABI/testing/sysfs-class-devfreq | 143 +
.../ABI/testing/sysfs-class-devfreq-event | 25 +
Documentation/ABI/testing/sysfs-class-devlink | 130 +
Documentation/ABI/testing/sysfs-class-drm | 8 +
Documentation/ABI/testing/sysfs-class-extcon | 101 +
Documentation/ABI/testing/sysfs-class-fc | 27 +
Documentation/ABI/testing/sysfs-class-fc_host | 23 +
.../ABI/testing/sysfs-class-fc_remote_ports | 23 +
Documentation/ABI/testing/sysfs-class-firmware | 77 +
.../ABI/testing/sysfs-class-firmware-attributes | 494 +
Documentation/ABI/testing/sysfs-class-fpga-bridge | 11 +
Documentation/ABI/testing/sysfs-class-fpga-manager | 60 +
Documentation/ABI/testing/sysfs-class-fpga-region | 9 +
Documentation/ABI/testing/sysfs-class-gnss | 17 +
Documentation/ABI/testing/sysfs-class-hwmon | 1089 +
.../ABI/testing/sysfs-class-ieee80211-rtw89 | 24 +
Documentation/ABI/testing/sysfs-class-intel_pmt | 119 +
.../ABI/testing/sysfs-class-intel_pmt-features | 134 +
Documentation/ABI/testing/sysfs-class-iommu | 17 +
.../ABI/testing/sysfs-class-iommu-amd-iommu | 14 +
.../ABI/testing/sysfs-class-iommu-intel-iommu | 32 +
Documentation/ABI/testing/sysfs-class-lcd | 23 +
Documentation/ABI/testing/sysfs-class-led | 89 +
.../ABI/testing/sysfs-class-led-driver-aw200xx | 5 +
.../ABI/testing/sysfs-class-led-driver-lm3533 | 73 +
.../testing/sysfs-class-led-driver-turris-omnia | 28 +
Documentation/ABI/testing/sysfs-class-led-flash | 89 +
.../ABI/testing/sysfs-class-led-multicolor | 37 +
.../ABI/testing/sysfs-class-led-trigger-netdev | 192 +
.../ABI/testing/sysfs-class-led-trigger-oneshot | 36 +
.../ABI/testing/sysfs-class-led-trigger-pattern | 50 +
.../ABI/testing/sysfs-class-led-trigger-tty | 62 +
.../ABI/testing/sysfs-class-led-trigger-usbport | 13 +
Documentation/ABI/testing/sysfs-class-leds-gt683r | 18 +
Documentation/ABI/testing/sysfs-class-mei | 105 +
Documentation/ABI/testing/sysfs-class-mic | 178 +
Documentation/ABI/testing/sysfs-class-mtd | 242 +
Documentation/ABI/testing/sysfs-class-mux | 16 +
Documentation/ABI/testing/sysfs-class-net | 354 +
Documentation/ABI/testing/sysfs-class-net-cdc_ncm | 168 +
Documentation/ABI/testing/sysfs-class-net-dsa | 14 +
Documentation/ABI/testing/sysfs-class-net-grcan | 35 +
.../ABI/testing/sysfs-class-net-janz-ican3 | 19 +
Documentation/ABI/testing/sysfs-class-net-peak_usb | 19 +
Documentation/ABI/testing/sysfs-class-net-phydev | 75 +
Documentation/ABI/testing/sysfs-class-net-qmi | 76 +
Documentation/ABI/testing/sysfs-class-net-queues | 121 +
.../ABI/testing/sysfs-class-net-statistics | 217 +
Documentation/ABI/testing/sysfs-class-ocxl | 51 +
.../ABI/testing/sysfs-class-platform-profile | 50 +
Documentation/ABI/testing/sysfs-class-power | 906 +
.../ABI/testing/sysfs-class-power-bd71828 | 13 +
Documentation/ABI/testing/sysfs-class-power-gaokun | 27 +
.../ABI/testing/sysfs-class-power-ltc4162l | 82 +
.../ABI/testing/sysfs-class-power-max1720x | 32 +
Documentation/ABI/testing/sysfs-class-power-mp2629 | 9 +
Documentation/ABI/testing/sysfs-class-power-rt9467 | 19 +
Documentation/ABI/testing/sysfs-class-power-rt9471 | 32 +
Documentation/ABI/testing/sysfs-class-power-rt9756 | 30 +
.../ABI/testing/sysfs-class-power-surface | 15 +
.../ABI/testing/sysfs-class-power-twl4030 | 33 +
Documentation/ABI/testing/sysfs-class-power-wilco | 40 +
Documentation/ABI/testing/sysfs-class-powercap | 152 +
Documentation/ABI/testing/sysfs-class-pwm | 88 +
Documentation/ABI/testing/sysfs-class-rapidio | 59 +
Documentation/ABI/testing/sysfs-class-rc | 137 +
Documentation/ABI/testing/sysfs-class-rc-nuvoton | 15 +
.../testing/sysfs-class-reboot-mode-reboot_modes | 39 +
Documentation/ABI/testing/sysfs-class-regulator | 453 +
Documentation/ABI/testing/sysfs-class-remoteproc | 104 +
Documentation/ABI/testing/sysfs-class-rnbd-client | 133 +
Documentation/ABI/testing/sysfs-class-rnbd-server | 58 +
Documentation/ABI/testing/sysfs-class-rtc | 91 +
.../sysfs-class-rtc-rtc0-device-rtc_calibration | 14 +
Documentation/ABI/testing/sysfs-class-rtrs-client | 146 +
Documentation/ABI/testing/sysfs-class-rtrs-server | 53 +
Documentation/ABI/testing/sysfs-class-scsi_host | 119 +
Documentation/ABI/testing/sysfs-class-scsi_tape | 109 +
Documentation/ABI/testing/sysfs-class-spi-eeprom | 30 +
Documentation/ABI/testing/sysfs-class-stm | 24 +
Documentation/ABI/testing/sysfs-class-stm_source | 11 +
Documentation/ABI/testing/sysfs-class-switchtec | 96 +
Documentation/ABI/testing/sysfs-class-tee | 25 +
Documentation/ABI/testing/sysfs-class-thermal | 259 +
Documentation/ABI/testing/sysfs-class-tsm | 9 +
Documentation/ABI/testing/sysfs-class-typec | 386 +
.../ABI/testing/sysfs-class-usb_power_delivery | 284 +
Documentation/ABI/testing/sysfs-class-usb_role | 27 +
Documentation/ABI/testing/sysfs-class-vduse | 33 +
Documentation/ABI/testing/sysfs-class-wakeup | 76 +
Documentation/ABI/testing/sysfs-class-watchdog | 129 +
Documentation/ABI/testing/sysfs-class-zram | 24 +
Documentation/ABI/testing/sysfs-dev | 21 +
Documentation/ABI/testing/sysfs-devices | 25 +
Documentation/ABI/testing/sysfs-devices-consumer | 9 +
Documentation/ABI/testing/sysfs-devices-coredump | 10 +
Documentation/ABI/testing/sysfs-devices-edac | 157 +
.../ABI/testing/sysfs-devices-faux-tdx-host | 26 +
.../ABI/testing/sysfs-devices-firmware_node | 17 +
Documentation/ABI/testing/sysfs-devices-lpss_ltr | 44 +
Documentation/ABI/testing/sysfs-devices-mapping | 62 +
Documentation/ABI/testing/sysfs-devices-memory | 120 +
Documentation/ABI/testing/sysfs-devices-mmc | 21 +
Documentation/ABI/testing/sysfs-devices-online | 20 +
.../ABI/testing/sysfs-devices-pci-host-bridge | 45 +
.../ABI/testing/sysfs-devices-physical_location | 42 +
.../ABI/testing/sysfs-devices-platform-ACPI-TAD | 117 +
.../testing/sysfs-devices-platform-_UDC_-gadget | 23 +
.../ABI/testing/sysfs-devices-platform-docg3 | 40 +
.../ABI/testing/sysfs-devices-platform-dock | 39 +
.../ABI/testing/sysfs-devices-platform-ipmi | 242 +
.../testing/sysfs-devices-platform-kunpeng_hccs | 126 +
.../sysfs-devices-platform-sh_mobile_lcdc_fb | 44 +
.../ABI/testing/sysfs-devices-platform-soc-ipa | 114 +
.../testing/sysfs-devices-platform-stratix10-rsu | 174 +
.../ABI/testing/sysfs-devices-platform-trackpoint | 115 +
Documentation/ABI/testing/sysfs-devices-power | 307 +
.../ABI/testing/sysfs-devices-power_resources_D0 | 13 +
.../ABI/testing/sysfs-devices-power_resources_D1 | 14 +
.../ABI/testing/sysfs-devices-power_resources_D2 | 14 +
.../testing/sysfs-devices-power_resources_D3hot | 14 +
.../testing/sysfs-devices-power_resources_wakeup | 13 +
.../ABI/testing/sysfs-devices-power_state | 20 +
.../ABI/testing/sysfs-devices-real_power_state | 23 +
Documentation/ABI/testing/sysfs-devices-removable | 20 +
.../ABI/testing/sysfs-devices-resource_in_use | 12 +
Documentation/ABI/testing/sysfs-devices-soc | 95 +
.../ABI/testing/sysfs-devices-software_node | 10 +
.../ABI/testing/sysfs-devices-state_synced | 29 +
Documentation/ABI/testing/sysfs-devices-sun | 14 +
Documentation/ABI/testing/sysfs-devices-supplier | 9 +
Documentation/ABI/testing/sysfs-devices-system-cpu | 808 +
.../ABI/testing/sysfs-devices-system-ibm-rtl | 24 +
.../ABI/testing/sysfs-devices-system-xen_cpu | 20 +
Documentation/ABI/testing/sysfs-devices-vfio-dev | 8 +
.../testing/sysfs-devices-virtual-misc-tdx_guest | 63 +
.../ABI/testing/sysfs-devices-waiting_for_supplier | 17 +
Documentation/ABI/testing/sysfs-devices-xenbus | 41 +
Documentation/ABI/testing/sysfs-driver-altera-cvp | 8 +
Documentation/ABI/testing/sysfs-driver-amd-sfh | 13 +
.../ABI/testing/sysfs-driver-aspeed-uart-routing | 27 +
.../ABI/testing/sysfs-driver-bd9571mwv-regulator | 31 +
Documentation/ABI/testing/sysfs-driver-ccp | 120 +
.../ABI/testing/sysfs-driver-chromeos-acpi | 152 +
.../ABI/testing/sysfs-driver-dell-dw5826e-reset | 9 +
Documentation/ABI/testing/sysfs-driver-eud | 9 +
.../ABI/testing/sysfs-driver-framer-pef2256 | 8 +
.../ABI/testing/sysfs-driver-fsi-master-gpio | 10 +
Documentation/ABI/testing/sysfs-driver-ge-achc | 15 +
Documentation/ABI/testing/sysfs-driver-genwqe | 78 +
Documentation/ABI/testing/sysfs-driver-habanalabs | 265 +
Documentation/ABI/testing/sysfs-driver-hid | 20 +
.../ABI/testing/sysfs-driver-hid-appletb-kbd | 13 +
Documentation/ABI/testing/sysfs-driver-hid-corsair | 15 +
.../ABI/testing/sysfs-driver-hid-corsair-void | 38 +
Documentation/ABI/testing/sysfs-driver-hid-lenovo | 60 +
.../ABI/testing/sysfs-driver-hid-lenovo-go | 724 +
.../ABI/testing/sysfs-driver-hid-lenovo-go-s | 304 +
.../ABI/testing/sysfs-driver-hid-logitech-hidpp | 19 +
.../ABI/testing/sysfs-driver-hid-logitech-lg4ff | 75 +
.../ABI/testing/sysfs-driver-hid-multitouch | 9 +
Documentation/ABI/testing/sysfs-driver-hid-ntrig | 73 +
Documentation/ABI/testing/sysfs-driver-hid-picolcd | 43 +
.../ABI/testing/sysfs-driver-hid-prodikeys | 29 +
.../ABI/testing/sysfs-driver-hid-roccat-kone | 125 +
Documentation/ABI/testing/sysfs-driver-hid-srws1 | 21 +
Documentation/ABI/testing/sysfs-driver-hid-wiimote | 85 +
.../ABI/testing/sysfs-driver-input-axp-pek | 11 +
.../ABI/testing/sysfs-driver-input-cros-ec-keyb | 6 +
.../ABI/testing/sysfs-driver-input-exc3000 | 26 +
Documentation/ABI/testing/sysfs-driver-intc_sar | 54 +
.../ABI/testing/sysfs-driver-intel-i915-hwmon | 93 +
.../ABI/testing/sysfs-driver-intel-m10-bmc | 36 +
.../testing/sysfs-driver-intel-m10-bmc-sec-update | 61 +
.../ABI/testing/sysfs-driver-intel-rapid-start | 21 +
.../ABI/testing/sysfs-driver-intel-xe-hwmon | 308 +
.../ABI/testing/sysfs-driver-intel-xe-sriov | 190 +
Documentation/ABI/testing/sysfs-driver-intel_sdsi | 90 +
Documentation/ABI/testing/sysfs-driver-ivpu | 65 +
.../ABI/testing/sysfs-driver-jz4780-efuse | 20 +
.../ABI/testing/sysfs-driver-panfrost-profiling | 10 +
.../ABI/testing/sysfs-driver-panthor-profiling | 10 +
Documentation/ABI/testing/sysfs-driver-pciback | 28 +
Documentation/ABI/testing/sysfs-driver-ppi | 75 +
Documentation/ABI/testing/sysfs-driver-qaic | 18 +
Documentation/ABI/testing/sysfs-driver-qat | 167 +
Documentation/ABI/testing/sysfs-driver-qat_kpt | 97 +
Documentation/ABI/testing/sysfs-driver-qat_ras | 41 +
Documentation/ABI/testing/sysfs-driver-qat_rl | 226 +
Documentation/ABI/testing/sysfs-driver-qat_svn | 114 +
.../ABI/testing/sysfs-driver-samsung-laptop | 37 +
Documentation/ABI/testing/sysfs-driver-spi-intel | 20 +
Documentation/ABI/testing/sysfs-driver-st | 12 +
Documentation/ABI/testing/sysfs-driver-tegra-fuse | 11 +
.../ABI/testing/sysfs-driver-toshiba_acpi | 223 +
.../ABI/testing/sysfs-driver-toshiba_haps | 22 +
.../ABI/testing/sysfs-driver-typec-displayport | 74 +
Documentation/ABI/testing/sysfs-driver-uacce | 57 +
Documentation/ABI/testing/sysfs-driver-ucsi-ccg | 6 +
Documentation/ABI/testing/sysfs-driver-ufs | 1793 +
.../ABI/testing/sysfs-driver-uio_pci_sva-pasid | 29 +
.../ABI/testing/sysfs-driver-uniwill-laptop | 80 +
Documentation/ABI/testing/sysfs-driver-w1_ds28e17 | 24 +
Documentation/ABI/testing/sysfs-driver-w1_therm | 190 +
Documentation/ABI/testing/sysfs-driver-wacom | 105 +
Documentation/ABI/testing/sysfs-driver-xdata | 49 +
Documentation/ABI/testing/sysfs-driver-xen-blkback | 46 +
.../ABI/testing/sysfs-driver-xen-blkfront | 19 +
.../ABI/testing/sysfs-driver-xilinx-tmr-manager | 16 +
Documentation/ABI/testing/sysfs-driver-zynqmp-fpga | 73 +
Documentation/ABI/testing/sysfs-edac-ecs | 74 +
Documentation/ABI/testing/sysfs-edac-memory-repair | 206 +
Documentation/ABI/testing/sysfs-edac-scrub | 85 +
Documentation/ABI/testing/sysfs-firmware-acpi | 277 +
.../ABI/testing/sysfs-firmware-dmi-entries | 114 +
.../ABI/testing/sysfs-firmware-dmi-tables | 22 +
Documentation/ABI/testing/sysfs-firmware-efi | 45 +
Documentation/ABI/testing/sysfs-firmware-efi-esrt | 87 +
.../ABI/testing/sysfs-firmware-efi-runtime-map | 36 +
Documentation/ABI/testing/sysfs-firmware-gsmi | 58 +
Documentation/ABI/testing/sysfs-firmware-initrd | 8 +
.../ABI/testing/sysfs-firmware-lefi-boardinfo | 35 +
Documentation/ABI/testing/sysfs-firmware-log | 7 +
Documentation/ABI/testing/sysfs-firmware-memmap | 75 +
Documentation/ABI/testing/sysfs-firmware-ofw | 52 +
.../ABI/testing/sysfs-firmware-opal-powercap | 31 +
Documentation/ABI/testing/sysfs-firmware-opal-psr | 18 +
.../ABI/testing/sysfs-firmware-opal-sensor-groups | 21 +
.../testing/sysfs-firmware-papr-energy-scale-info | 29 +
Documentation/ABI/testing/sysfs-firmware-plpks | 58 +
.../ABI/testing/sysfs-firmware-qemu_fw_cfg | 103 +
Documentation/ABI/testing/sysfs-firmware-sgi_uv | 159 +
.../ABI/testing/sysfs-firmware-turris-mox-rwtm | 28 +
Documentation/ABI/testing/sysfs-fs-erofs | 49 +
Documentation/ABI/testing/sysfs-fs-ext4 | 118 +
Documentation/ABI/testing/sysfs-fs-f2fs | 1004 +
Documentation/ABI/testing/sysfs-fs-nilfs2 | 269 +
Documentation/ABI/testing/sysfs-fs-ubifs | 35 +
Documentation/ABI/testing/sysfs-fs-virtiofs | 11 +
Documentation/ABI/testing/sysfs-fs-xfs | 37 +
Documentation/ABI/testing/sysfs-hypervisor-xen | 46 +
Documentation/ABI/testing/sysfs-ibft | 33 +
.../ABI/testing/sysfs-kernel-address_bits | 10 +
Documentation/ABI/testing/sysfs-kernel-boot_params | 39 +
Documentation/ABI/testing/sysfs-kernel-btf | 25 +
.../ABI/testing/sysfs-kernel-cpu_byteorder | 12 +
Documentation/ABI/testing/sysfs-kernel-fadump | 59 +
Documentation/ABI/testing/sysfs-kernel-fscaps | 8 +
.../ABI/testing/sysfs-kernel-hardlockup_count | 7 +
.../ABI/testing/sysfs-kernel-iommu_groups | 64 +
Documentation/ABI/testing/sysfs-kernel-irq | 60 +
Documentation/ABI/testing/sysfs-kernel-kexec-kdump | 61 +
Documentation/ABI/testing/sysfs-kernel-livepatch | 95 +
Documentation/ABI/testing/sysfs-kernel-mm | 6 +
Documentation/ABI/testing/sysfs-kernel-mm-cma | 44 +
Documentation/ABI/testing/sysfs-kernel-mm-damon | 603 +
.../ABI/testing/sysfs-kernel-mm-hugepages | 17 +
Documentation/ABI/testing/sysfs-kernel-mm-ksm | 61 +
.../ABI/testing/sysfs-kernel-mm-memory-tiers | 25 +
.../ABI/testing/sysfs-kernel-mm-mempolicy | 4 +
.../sysfs-kernel-mm-mempolicy-weighted-interleave | 54 +
Documentation/ABI/testing/sysfs-kernel-mm-numa | 28 +
Documentation/ABI/testing/sysfs-kernel-mm-swap | 16 +
.../testing/sysfs-kernel-mm-transparent-hugepage | 18 +
Documentation/ABI/testing/sysfs-kernel-oops_count | 6 +
.../ABI/testing/sysfs-kernel-rcu_stall_count | 6 +
Documentation/ABI/testing/sysfs-kernel-reboot | 40 +
Documentation/ABI/testing/sysfs-kernel-slab | 520 +
.../ABI/testing/sysfs-kernel-softlockup_count | 7 +
Documentation/ABI/testing/sysfs-kernel-vmcoreinfo | 14 +
Documentation/ABI/testing/sysfs-kernel-warn_count | 6 +
Documentation/ABI/testing/sysfs-mce | 97 +
.../ABI/testing/sysfs-memory-page-offline | 44 +
Documentation/ABI/testing/sysfs-module | 84 +
Documentation/ABI/testing/sysfs-nvme | 13 +
Documentation/ABI/testing/sysfs-nvmem-cells | 21 +
Documentation/ABI/testing/sysfs-ocfs2 | 89 +
.../ABI/testing/sysfs-platform-alienware-wmi | 14 +
.../ABI/testing/sysfs-platform-asus-laptop | 71 +
Documentation/ABI/testing/sysfs-platform-asus-wmi | 240 +
Documentation/ABI/testing/sysfs-platform-at91 | 27 +
Documentation/ABI/testing/sysfs-platform-ayaneo-ec | 19 +
.../ABI/testing/sysfs-platform-brcmstb-gisb-arb | 8 +
.../ABI/testing/sysfs-platform-brcmstb-memc | 15 +
.../ABI/testing/sysfs-platform-chipidea-usb-otg | 56 +
.../ABI/testing/sysfs-platform-chipidea-usb2 | 9 +
.../ABI/testing/sysfs-platform-dell-laptop | 73 +
.../ABI/testing/sysfs-platform-dell-privacy-wmi | 71 +
.../ABI/testing/sysfs-platform-dell-smbios | 21 +
.../ABI/testing/sysfs-platform-dell-wmi-ddv | 9 +
Documentation/ABI/testing/sysfs-platform-dfl-fme | 246 +
Documentation/ABI/testing/sysfs-platform-dfl-port | 101 +
Documentation/ABI/testing/sysfs-platform-dptf | 157 +
.../ABI/testing/sysfs-platform-eeepc-laptop | 56 +
Documentation/ABI/testing/sysfs-platform-hidma | 9 +
.../ABI/testing/sysfs-platform-hidma-mgmt | 97 +
.../ABI/testing/sysfs-platform-i2c-demux-pinctrl | 18 +
.../ABI/testing/sysfs-platform-ideapad-laptop | 52 +
Documentation/ABI/testing/sysfs-platform-intel-ifs | 52 +
Documentation/ABI/testing/sysfs-platform-intel-pmc | 22 +
.../testing/sysfs-platform-intel-wmi-sbl-fw-update | 13 +
.../testing/sysfs-platform-intel-wmi-thunderbolt | 12 +
Documentation/ABI/testing/sysfs-platform-kim | 49 +
Documentation/ABI/testing/sysfs-platform-lg-laptop | 36 +
.../ABI/testing/sysfs-platform-mellanox-bootctl | 162 +
.../ABI/testing/sysfs-platform-mellanox-pmc | 64 +
.../ABI/testing/sysfs-platform-msi-laptop | 83 +
Documentation/ABI/testing/sysfs-platform-oxp | 25 +
.../ABI/testing/sysfs-platform-phy-rcar-gen3-usb2 | 17 +
.../ABI/testing/sysfs-platform-power-on-reason | 12 +
.../ABI/testing/sysfs-platform-renesas_usb3 | 17 +
Documentation/ABI/testing/sysfs-platform-silicom | 30 +
Documentation/ABI/testing/sysfs-platform-sst-atom | 26 +
Documentation/ABI/testing/sysfs-platform-tahvo-usb | 16 +
Documentation/ABI/testing/sysfs-platform-ts5500 | 54 +
.../ABI/testing/sysfs-platform-twl4030-usb | 8 +
.../ABI/testing/sysfs-platform-usbip-vudc | 38 +
Documentation/ABI/testing/sysfs-platform-wilco-ec | 58 +
Documentation/ABI/testing/sysfs-platform_profile | 40 +
Documentation/ABI/testing/sysfs-power | 472 +
Documentation/ABI/testing/sysfs-pps | 73 +
Documentation/ABI/testing/sysfs-pps-gen | 43 +
Documentation/ABI/testing/sysfs-pps-gen-tio | 6 +
Documentation/ABI/testing/sysfs-profiling | 13 +
Documentation/ABI/testing/sysfs-ptp | 142 +
Documentation/ABI/testing/sysfs-secvar | 65 +
Documentation/ABI/testing/sysfs-timecard | 293 +
Documentation/ABI/testing/sysfs-tty | 166 +
Documentation/ABI/testing/sysfs-uevent | 51 +
Documentation/ABI/testing/usb-charger-uevent | 54 +
Documentation/ABI/testing/usb-uevent | 27 +
Documentation/Changes | 1 +
Documentation/CodingStyle | 1 +
Documentation/Kconfig | 28 +
Documentation/Makefile | 115 +
Documentation/PCI/acpi-info.rst | 192 +
Documentation/PCI/boot-interrupts.rst | 159 +
Documentation/PCI/controller/index.rst | 10 +
.../PCI/controller/rcar-pcie-firmware.rst | 32 +
.../PCI/endpoint/function/binding/pci-ntb.rst | 38 +
.../PCI/endpoint/function/binding/pci-test.rst | 26 +
Documentation/PCI/endpoint/index.rst | 21 +
Documentation/PCI/endpoint/pci-endpoint-cfs.rst | 138 +
Documentation/PCI/endpoint/pci-endpoint.rst | 283 +
Documentation/PCI/endpoint/pci-ntb-function.rst | 348 +
Documentation/PCI/endpoint/pci-ntb-howto.rst | 158 +
Documentation/PCI/endpoint/pci-nvme-function.rst | 13 +
Documentation/PCI/endpoint/pci-test-function.rst | 103 +
Documentation/PCI/endpoint/pci-test-howto.rst | 239 +
Documentation/PCI/endpoint/pci-vntb-function.rst | 129 +
Documentation/PCI/endpoint/pci-vntb-howto.rst | 169 +
Documentation/PCI/index.rst | 22 +
Documentation/PCI/msi-howto.rst | 300 +
Documentation/PCI/pci-error-recovery.rst | 471 +
Documentation/PCI/pci-iov-howto.rst | 171 +
Documentation/PCI/pci.rst | 578 +
Documentation/PCI/pcieaer-howto.rst | 267 +
Documentation/PCI/pciebus-howto.rst | 228 +
Documentation/PCI/sysfs-pci.rst | 138 +
Documentation/PCI/tph.rst | 132 +
.../Design/Data-Structures/BigTreeClassicRCU.svg | 474 +
.../BigTreePreemptRCUBHdyntickCB.svg | 662 +
.../RCU/Design/Data-Structures/Data-Structures.rst | 1196 +
.../Design/Data-Structures/HugeTreeClassicRCU.svg | 939 +
.../RCU/Design/Data-Structures/TreeLevel.svg | 828 +
.../RCU/Design/Data-Structures/TreeMapping.svg | 305 +
.../Design/Data-Structures/TreeMappingLevel.svg | 380 +
.../RCU/Design/Data-Structures/blkd_task.svg | 631 +
.../RCU/Design/Data-Structures/nxtlist.svg | 386 +
.../Design/Expedited-Grace-Periods/ExpRCUFlow.svg | 830 +
.../Expedited-Grace-Periods/ExpSchedFlow.svg | 830 +
.../Expedited-Grace-Periods.rst | 521 +
.../RCU/Design/Expedited-Grace-Periods/Funnel0.svg | 275 +
.../RCU/Design/Expedited-Grace-Periods/Funnel1.svg | 275 +
.../RCU/Design/Expedited-Grace-Periods/Funnel2.svg | 287 +
.../RCU/Design/Expedited-Grace-Periods/Funnel3.svg | 323 +
.../RCU/Design/Expedited-Grace-Periods/Funnel4.svg | 323 +
.../RCU/Design/Expedited-Grace-Periods/Funnel5.svg | 335 +
.../RCU/Design/Expedited-Grace-Periods/Funnel6.svg | 335 +
.../RCU/Design/Expedited-Grace-Periods/Funnel7.svg | 347 +
.../RCU/Design/Expedited-Grace-Periods/Funnel8.svg | 311 +
.../Memory-Ordering/Tree-RCU-Memory-Ordering.rst | 648 +
.../TreeRCU-callback-invocation.svg | 486 +
.../Memory-Ordering/TreeRCU-callback-registry.svg | 646 +
.../RCU/Design/Memory-Ordering/TreeRCU-dyntick.svg | 700 +
.../Design/Memory-Ordering/TreeRCU-gp-cleanup.svg | 1133 +
.../RCU/Design/Memory-Ordering/TreeRCU-gp-fqs.svg | 1309 +
.../Design/Memory-Ordering/TreeRCU-gp-init-1.svg | 658 +
.../Design/Memory-Ordering/TreeRCU-gp-init-2.svg | 656 +
.../Design/Memory-Ordering/TreeRCU-gp-init-3.svg | 636 +
.../RCU/Design/Memory-Ordering/TreeRCU-gp.svg | 5135 +
.../RCU/Design/Memory-Ordering/TreeRCU-hotplug.svg | 775 +
.../RCU/Design/Memory-Ordering/TreeRCU-qs.svg | 1095 +
.../RCU/Design/Memory-Ordering/rcu_node-lock.svg | 229 +
.../Design/Requirements/GPpartitionReaders1.svg | 374 +
.../Design/Requirements/ReadersPartitionGP1.svg | 639 +
.../RCU/Design/Requirements/Requirements.rst | 2873 +
Documentation/RCU/NMI-RCU.rst | 123 +
Documentation/RCU/RTFP.txt | 2812 +
Documentation/RCU/UP.rst | 152 +
Documentation/RCU/checklist.rst | 556 +
Documentation/RCU/index.rst | 30 +
Documentation/RCU/listRCU.rst | 511 +
Documentation/RCU/lockdep-splat.rst | 115 +
Documentation/RCU/lockdep.rst | 119 +
Documentation/RCU/rcu.rst | 93 +
Documentation/RCU/rcu_dereference.rst | 502 +
Documentation/RCU/rcubarrier.rst | 377 +
Documentation/RCU/rculist_nulls.rst | 215 +
Documentation/RCU/rcuref.rst | 158 +
Documentation/RCU/stallwarn.rst | 491 +
Documentation/RCU/torture.rst | 374 +
Documentation/RCU/whatisRCU.rst | 1415 +
Documentation/SubmittingPatches | 1 +
Documentation/accel/amdxdna/amdnpu.rst | 306 +
Documentation/accel/amdxdna/index.rst | 11 +
Documentation/accel/index.rst | 13 +
Documentation/accel/introduction.rst | 110 +
Documentation/accel/qaic/aic080.rst | 14 +
Documentation/accel/qaic/aic100.rst | 538 +
Documentation/accel/qaic/index.rst | 14 +
Documentation/accel/qaic/qaic.rst | 209 +
Documentation/accel/rocket/index.rst | 19 +
Documentation/accounting/cgroupstats.rst | 31 +
Documentation/accounting/delay-accounting.rst | 214 +
Documentation/accounting/index.rst | 14 +
Documentation/accounting/psi.rst | 188 +
Documentation/accounting/taskstats-struct.rst | 199 +
Documentation/accounting/taskstats.rst | 182 +
Documentation/admin-guide/LSM/LoadPin.rst | 31 +
Documentation/admin-guide/LSM/SELinux.rst | 44 +
Documentation/admin-guide/LSM/SafeSetID.rst | 118 +
Documentation/admin-guide/LSM/Smack.rst | 871 +
Documentation/admin-guide/LSM/Yama.rst | 75 +
Documentation/admin-guide/LSM/apparmor.rst | 54 +
Documentation/admin-guide/LSM/index.rst | 51 +
Documentation/admin-guide/LSM/ipe.rst | 835 +
Documentation/admin-guide/LSM/landlock.rst | 194 +
Documentation/admin-guide/LSM/tomoyo.rst | 52 +
.../admin-guide/RAS/address-translation.rst | 24 +
Documentation/admin-guide/RAS/error-decoding.rst | 21 +
Documentation/admin-guide/RAS/index.rst | 7 +
Documentation/admin-guide/RAS/main.rst | 1087 +
Documentation/admin-guide/README.rst | 360 +
Documentation/admin-guide/abi-obsolete-files.rst | 7 +
Documentation/admin-guide/abi-obsolete.rst | 13 +
Documentation/admin-guide/abi-removed-files.rst | 7 +
Documentation/admin-guide/abi-removed.rst | 7 +
Documentation/admin-guide/abi-stable-files.rst | 7 +
Documentation/admin-guide/abi-stable.rst | 16 +
Documentation/admin-guide/abi-testing-files.rst | 7 +
Documentation/admin-guide/abi-testing.rst | 22 +
Documentation/admin-guide/abi.rst | 29 +
Documentation/admin-guide/acpi/cppc_sysfs.rst | 78 +
.../admin-guide/acpi/fan_performance_states.rst | 90 +
Documentation/admin-guide/acpi/index.rst | 14 +
.../admin-guide/acpi/initrd_table_override.rst | 115 +
Documentation/admin-guide/acpi/ssdt-overlays.rst | 181 +
Documentation/admin-guide/aoe/aoe.rst | 150 +
Documentation/admin-guide/aoe/autoload.sh | 17 +
Documentation/admin-guide/aoe/examples.rst | 23 +
Documentation/admin-guide/aoe/index.rst | 10 +
Documentation/admin-guide/aoe/status.sh | 30 +
Documentation/admin-guide/aoe/todo.rst | 17 +
Documentation/admin-guide/aoe/udev-install.sh | 33 +
Documentation/admin-guide/aoe/udev.txt | 26 +
.../admin-guide/auxdisplay/cfag12864b.rst | 98 +
Documentation/admin-guide/auxdisplay/index.rst | 9 +
Documentation/admin-guide/auxdisplay/ks0108.rst | 50 +
Documentation/admin-guide/bcache.rst | 644 +
Documentation/admin-guide/binderfs.rst | 87 +
Documentation/admin-guide/binfmt-misc.rst | 391 +
.../blockdev/drbd/DRBD-8.3-data-packets.svg | 588 +
.../blockdev/drbd/DRBD-data-packets.svg | 459 +
.../admin-guide/blockdev/drbd/conn-states-8.dot | 18 +
.../blockdev/drbd/data-structure-v9.rst | 42 +
.../admin-guide/blockdev/drbd/disk-states-8.dot | 16 +
.../drbd/drbd-connection-state-overview.dot | 85 +
.../admin-guide/blockdev/drbd/figures.rst | 30 +
Documentation/admin-guide/blockdev/drbd/index.rst | 19 +
.../admin-guide/blockdev/drbd/peer-states-8.dot | 8 +
Documentation/admin-guide/blockdev/floppy.rst | 255 +
Documentation/admin-guide/blockdev/index.rst | 17 +
Documentation/admin-guide/blockdev/nbd.rst | 31 +
Documentation/admin-guide/blockdev/paride.rst | 207 +
Documentation/admin-guide/blockdev/ramdisk.rst | 153 +
Documentation/admin-guide/blockdev/zoned_loop.rst | 190 +
Documentation/admin-guide/blockdev/zram.rst | 578 +
Documentation/admin-guide/bootconfig.rst | 335 +
Documentation/admin-guide/braille-console.rst | 38 +
Documentation/admin-guide/btmrvl.rst | 124 +
Documentation/admin-guide/bug-bisect.rst | 165 +
Documentation/admin-guide/bug-hunting.rst | 370 +
.../admin-guide/cgroup-v1/blkio-controller.rst | 301 +
Documentation/admin-guide/cgroup-v1/cgroups.rst | 697 +
Documentation/admin-guide/cgroup-v1/cpuacct.rst | 50 +
Documentation/admin-guide/cgroup-v1/cpusets.rst | 884 +
Documentation/admin-guide/cgroup-v1/devices.rst | 132 +
.../admin-guide/cgroup-v1/freezer-subsystem.rst | 131 +
Documentation/admin-guide/cgroup-v1/hugetlb.rst | 139 +
Documentation/admin-guide/cgroup-v1/index.rst | 24 +
Documentation/admin-guide/cgroup-v1/memcg_test.rst | 342 +
Documentation/admin-guide/cgroup-v1/memory.rst | 963 +
Documentation/admin-guide/cgroup-v1/misc.rst | 4 +
Documentation/admin-guide/cgroup-v1/net_cls.rst | 44 +
Documentation/admin-guide/cgroup-v1/net_prio.rst | 57 +
Documentation/admin-guide/cgroup-v1/pids.rst | 93 +
Documentation/admin-guide/cgroup-v1/rdma.rst | 183 +
Documentation/admin-guide/cgroup-v2.rst | 3524 +
Documentation/admin-guide/cifs/authors.rst | 69 +
Documentation/admin-guide/cifs/changes.rst | 9 +
Documentation/admin-guide/cifs/index.rst | 14 +
Documentation/admin-guide/cifs/introduction.rst | 53 +
Documentation/admin-guide/cifs/todo.rst | 133 +
Documentation/admin-guide/cifs/usage.rst | 864 +
Documentation/admin-guide/cifs/winucase_convert.pl | 62 +
Documentation/admin-guide/clearing-warn-once.rst | 9 +
Documentation/admin-guide/cpu-isolation.rst | 357 +
Documentation/admin-guide/cpu-load.rst | 117 +
Documentation/admin-guide/cputopology.rst | 101 +
Documentation/admin-guide/dell_rbu.rst | 128 +
.../admin-guide/device-mapper/cache-policies.rst | 131 +
Documentation/admin-guide/device-mapper/cache.rst | 337 +
Documentation/admin-guide/device-mapper/delay.rst | 54 +
.../admin-guide/device-mapper/dm-clone.rst | 333 +
.../admin-guide/device-mapper/dm-crypt.rst | 212 +
.../admin-guide/device-mapper/dm-dust.rst | 305 +
Documentation/admin-guide/device-mapper/dm-ebs.rst | 51 +
.../admin-guide/device-mapper/dm-flakey.rst | 88 +
Documentation/admin-guide/device-mapper/dm-ima.rst | 715 +
.../admin-guide/device-mapper/dm-init.rst | 133 +
.../admin-guide/device-mapper/dm-inlinecrypt.rst | 129 +
.../admin-guide/device-mapper/dm-integrity.rst | 308 +
Documentation/admin-guide/device-mapper/dm-io.rst | 75 +
Documentation/admin-guide/device-mapper/dm-log.rst | 57 +
.../admin-guide/device-mapper/dm-pcache.rst | 202 +
.../admin-guide/device-mapper/dm-queue-length.rst | 48 +
.../admin-guide/device-mapper/dm-raid.rst | 489 +
.../admin-guide/device-mapper/dm-service-time.rst | 101 +
.../admin-guide/device-mapper/dm-uevent.rst | 110 +
.../admin-guide/device-mapper/dm-zoned.rst | 194 +
Documentation/admin-guide/device-mapper/era.rst | 116 +
Documentation/admin-guide/device-mapper/index.rst | 43 +
Documentation/admin-guide/device-mapper/kcopyd.rst | 47 +
Documentation/admin-guide/device-mapper/linear.rst | 63 +
.../admin-guide/device-mapper/log-writes.rst | 145 +
.../admin-guide/device-mapper/persistent-data.rst | 88 +
.../admin-guide/device-mapper/snapshot.rst | 196 +
.../admin-guide/device-mapper/statistics.rst | 225 +
.../admin-guide/device-mapper/striped.rst | 61 +
Documentation/admin-guide/device-mapper/switch.rst | 141 +
.../device-mapper/thin-provisioning.rst | 427 +
.../admin-guide/device-mapper/unstriped.rst | 135 +
.../admin-guide/device-mapper/vdo-design.rst | 633 +
Documentation/admin-guide/device-mapper/vdo.rst | 413 +
Documentation/admin-guide/device-mapper/verity.rst | 349 +
.../admin-guide/device-mapper/writecache.rst | 114 +
Documentation/admin-guide/device-mapper/zero.rst | 37 +
Documentation/admin-guide/devices.rst | 270 +
Documentation/admin-guide/devices.txt | 3081 +
Documentation/admin-guide/dynamic-debug-howto.rst | 392 +
Documentation/admin-guide/edid.rst | 27 +
Documentation/admin-guide/efi-stub.rst | 103 +
Documentation/admin-guide/ext4.rst | 611 +
Documentation/admin-guide/features.rst | 3 +
.../admin-guide/filesystem-monitoring.rst | 78 +
Documentation/admin-guide/gpio/gpio-aggregator.rst | 218 +
Documentation/admin-guide/gpio/gpio-mockup.rst | 59 +
Documentation/admin-guide/gpio/gpio-sim.rst | 137 +
Documentation/admin-guide/gpio/gpio-virtuser.rst | 177 +
Documentation/admin-guide/gpio/index.rst | 14 +
Documentation/admin-guide/gpio/obsolete.rst | 13 +
.../admin-guide/hw-vuln/attack_vector_controls.rst | 236 +
.../admin-guide/hw-vuln/core-scheduling.rst | 226 +
.../admin-guide/hw-vuln/cross-thread-rsb.rst | 91 +
.../admin-guide/hw-vuln/gather_data_sampling.rst | 109 +
Documentation/admin-guide/hw-vuln/index.rst | 29 +
.../hw-vuln/indirect-target-selection.rst | 168 +
Documentation/admin-guide/hw-vuln/l1d_flush.rst | 69 +
Documentation/admin-guide/hw-vuln/l1tf.rst | 615 +
[Output truncated: showing 1000 of 94942 lines]]
|
| 77/2 |
2026/09/21 01:05 |
llm |
expert |
0m
Model:
Tokens:
input: 43286
output: 38
thoughts: 755
Thoughts: **Analyzing a "BUG" Warning in IPv6 Code**
Alright, let's break this down. First, I confirmed that `b126f6f5940f` is the latest commit. I initially considered using `git-log` with a `CodeRegexp` to pinpoint the problematic commit. However, `git-log` only returned the merge commit, which isn't particularly helpful on its own. It's likely the merge introduced a conflict that the `git log` output shows. My gut says `git log -G` on the diff would be a better way to check.
Then I went back to `git-blame`. The output clearly shows `^b126f6f5940f` preceding those lines, so I immediately recognize that this indicates the lines of code existed at the initial commit of the shallow clone I'm looking at, or at least at a boundary commit. Itβs been there for quite a while.
The key is in understanding the code itself. The warning is: `pr_warn("BUG: Address %pI6c on device %s is missing its host route.\n", &ifp->addr, ifp->idev->dev->name);`. Itβs just a warning. This isn't a kernel panic or a crash.
The syzkaller report flagged this with its βBUG:β string. But since the code uses `pr_warn`, the kernel doesnβt halt, there isn't a crash. I need to figure out what happens if `ifp->rt` is NULL. I should inspect `__ipv6_ifa_notify` as the next step.
|
| 78/2 |
2026/09/21 01:06 |
tool |
read-file |
0m
Args: map[File:net/ipv6/addrconf.c FirstLine:6320 LineCount:50]
Results: map[Contents:6320: pr_warn("BUG: Address %pI6c on device %s is missing its host route.\n",
6321: &ifp->addr, ifp->idev->dev->name);
6322: }
6323:
6324: if (ifp->idev->cnf.forwarding)
6325: addrconf_join_anycast(ifp);
6326: if (!ipv6_addr_any(&ifp->peer_addr))
6327: addrconf_prefix_route(&ifp->peer_addr, 128,
6328: ifp->rt_priority, ifp->idev->dev,
6329: 0, 0, GFP_ATOMIC);
6330: break;
6331: case RTM_DELADDR:
6332: if (ifp->idev->cnf.forwarding)
6333: addrconf_leave_anycast(ifp);
6334: addrconf_leave_solict(ifp->idev, &ifp->addr);
6335: if (!ipv6_addr_any(&ifp->peer_addr)) {
6336: struct fib6_info *rt;
6337:
6338: rt = addrconf_get_prefix_route(&ifp->peer_addr, 128,
6339: ifp->idev->dev, 0, 0,
6340: false);
6341: if (rt)
6342: ip6_del_rt(net, rt, false);
6343: }
6344: if (ifp->rt) {
6345: ip6_del_rt(net, ifp->rt, false);
6346: ifp->rt = NULL;
6347: }
6348: rt_genid_bump_ipv6(net);
6349: break;
6350: }
6351: atomic_inc(&net->ipv6.dev_addr_genid);
6352: }
6353:
6354: static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
6355: {
6356: if (likely(ifp->idev->dead == 0))
6357: __ipv6_ifa_notify(event, ifp);
6358: }
6359:
6360: #ifdef CONFIG_SYSCTL
6361:
6362: static int addrconf_sysctl_forward(const struct ctl_table *ctl, int write,
6363: void *buffer, size_t *lenp, loff_t *ppos)
6364: {
6365: int *valp = ctl->data;
6366: int val = *valp;
6367: loff_t pos = *ppos;
6368: struct ctl_table lctl;
6369: int ret;
]
|
| 79/2 |
2026/09/21 01:06 |
llm |
expert |
0m
Model:
Tokens:
input: 45255
output: 58
thoughts: 61
Thoughts: **Analyzing the Code's Behavior**
Okay, so the program is throwing a warning, but it's *continuing* execution. That's good, in a way, as it's not a hard crash. But it's still a symptom of something I need to fix. My immediate thought is, "Where's the problem?" The text indicates that the code *isn't* dereferencing `ifp->rt` if it's `NULL` in the immediate context of the warning. That's a point in the code that's behaving properly, or at least handling the condition as expected.
But that still doesn't explain the warning. The question now becomes: where *else* might this be happening? It's time to thoroughly examine the code to see if there are other instances of `ifp->rt` being dereferenced, *without* a prior `NULL` check. I need to trace *every* reference to `ifp->rt` and carefully assess the surrounding logic. This feels like a classic pointer bug, so I need to be meticulous.
|
| 80/2 |
2026/09/21 01:06 |
tool |
codesearch-find-references |
0m
Args: map[ContextFile:net/ipv6/addrconf.c IncludeSnippetLines:0 Name:inet6_ifaddr::rt SourceTreePrefix:net/ipv6/]
Results: map[References:[map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:__ipv6_ifa_notify SourceFile:net/ipv6/addrconf.c SourceLine:6317] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:__ipv6_ifa_notify SourceFile:net/ipv6/addrconf.c SourceLine:6317] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:__ipv6_ifa_notify SourceFile:net/ipv6/addrconf.c SourceLine:6317] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:__ipv6_ifa_notify SourceFile:net/ipv6/addrconf.c SourceLine:6317] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:__ipv6_ifa_notify SourceFile:net/ipv6/addrconf.c SourceLine:6317] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:__ipv6_ifa_notify SourceFile:net/ipv6/addrconf.c SourceLine:6317] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:__ipv6_ifa_notify SourceFile:net/ipv6/addrconf.c SourceLine:6317] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:__ipv6_ifa_notify SourceFile:net/ipv6/addrconf.c SourceLine:6317] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:__ipv6_ifa_notify SourceFile:net/ipv6/addrconf.c SourceLine:6317] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:__ipv6_ifa_notify SourceFile:net/ipv6/addrconf.c SourceLine:6317] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:__ipv6_ifa_notify SourceFile:net/ipv6/addrconf.c SourceLine:6317] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:__ipv6_ifa_notify SourceFile:net/ipv6/addrconf.c SourceLine:6318] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:__ipv6_ifa_notify SourceFile:net/ipv6/addrconf.c SourceLine:6319] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:__ipv6_ifa_notify SourceFile:net/ipv6/addrconf.c SourceLine:6344] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:__ipv6_ifa_notify SourceFile:net/ipv6/addrconf.c SourceLine:6345] map[ReferenceKind:writes ReferencingEntityKind:function ReferencingEntityName:__ipv6_ifa_notify SourceFile:net/ipv6/addrconf.c SourceLine:6346] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:addrconf_dad_begin SourceFile:net/ipv6/addrconf.c SourceLine:4179] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:addrconf_disable_policy_idev SourceFile:net/ipv6/addrconf.c SourceLine:6711] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:addrconf_disable_policy_idev SourceFile:net/ipv6/addrconf.c SourceLine:6713] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:addrconf_disable_policy_idev SourceFile:net/ipv6/addrconf.c SourceLine:6717] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:addrconf_ifdown SourceFile:net/ipv6/addrconf.c SourceLine:3999] map[ReferenceKind:writes ReferencingEntityKind:function ReferencingEntityName:addrconf_ifdown SourceFile:net/ipv6/addrconf.c SourceLine:4000] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:fixup_permanent_addr SourceFile:net/ipv6/addrconf.c SourceLine:3608] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:fixup_permanent_addr SourceFile:net/ipv6/addrconf.c SourceLine:3608] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:fixup_permanent_addr SourceFile:net/ipv6/addrconf.c SourceLine:3618] map[ReferenceKind:writes ReferencingEntityKind:function ReferencingEntityName:fixup_permanent_addr SourceFile:net/ipv6/addrconf.c SourceLine:3619] map[ReferenceKind:writes ReferencingEntityKind:function ReferencingEntityName:ipv6_add_addr SourceFile:net/ipv6/addrconf.c SourceLine:1161]] TruncatedOutput:false]
|
| 81/2 |
2026/09/21 01:06 |
llm |
expert |
0m
Model:
Tokens:
input: 47077
output: 38
thoughts: 20
Thoughts: Here's my take on those thoughts, keeping in mind my expert perspective:
**Debugging Network Configuration: A Quick Check**
Okay, so I'm honing in on a potential issue, and the first place my mind goes is that `addrconf_dad_begin` function. That name immediately suggests it's involved in Duplicate Address Detection (DAD), which is a crucial part of IPv6 address configuration. DAD problems can manifest in all sorts of weird network behavior β addresses not being assigned correctly, connectivity drops, conflicts... the usual suspects. Line 4179 seems like a likely entry point for that functionality, so Iβm going to use that as my jumping-off point. It's a targeted approach; no need for a full code review just yet. I'll probably start by looking at what parameters are passed to that function, how it's called, and what its return values might indicate. From there, I can start to build a clearer picture of what the specific problem is, or if there's an actual problem at all. Hopefully I can spot something quickly and keep things moving!
|
| 82/2 |
2026/09/21 01:06 |
tool |
read-file |
0m
Args: map[File:net/ipv6/addrconf.c FirstLine:4170 LineCount:20]
Results: map[Contents:4170: addrconf_dad_stop(ifp, 0);
4171: return;
4172: }
4173:
4174: /*
4175: * Optimistic nodes can start receiving
4176: * Frames right away
4177: */
4178: if (ifp->flags & IFA_F_OPTIMISTIC) {
4179: ip6_ins_rt(net, ifp->rt);
4180: if (ipv6_use_optimistic_addr(net, idev)) {
4181: /* Because optimistic nodes can use this address,
4182: * notify listeners. If DAD fails, RTM_DELADDR is sent.
4183: */
4184: notify = true;
4185: }
4186: }
4187:
4188: addrconf_dad_kick(ifp);
4189: out:
]
|
| 83/2 |
2026/09/21 01:06 |
llm |
expert |
0m
Model:
Tokens:
input: 47641
output: 39
thoughts: 56
Thoughts: Here's my summary, as though I'm thinking through this myself:
**Analyzing a Potential Null Pointer Dereference**
Okay, so I'm looking at this code and a potential issue is jumping out at me. If `ifp->rt` happens to be NULL, and the `IFA_F_OPTIMISTIC` flag is also set, then the code is going to try to call `ip6_ins_rt(net, ifp->rt)`. That's where things get interesting. We're passing a potentially null `ifp->rt` to the function. We know that `ifp->rt` is not always checked before use.
My immediate concern is: does `ip6_ins_rt` handle a NULL `rt` pointer gracefully, or is this a ticking time bomb for a null pointer dereference? It's essential that I examine the implementation of `ip6_ins_rt` to confirm how it deals with a NULL `rt` argument. This is the critical next step. Let's dig into that function's code and see what's actually going on in there. It's the only way to be sure if this is a harmless edge case or something much more serious.
|
| 84/2 |
2026/09/21 01:06 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:ip6_ins_rt]
Results: map[SourceCode:1362: int ip6_ins_rt(struct net *net, struct fib6_info *rt)
1363: {
1364: struct nl_info info = { .nl_net = net, };
1365:
1366: return __ip6_ins_rt(rt, &info, NULL);
1367: }
SourceFile:net/ipv6/route.c]
|
| 85/2 |
2026/09/21 01:06 |
llm |
expert |
0m
Model:
Tokens:
input: 48125
output: 39
thoughts: 0
|
| 86/2 |
2026/09/21 01:06 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/route.c Name:__ip6_ins_rt]
Results: map[SourceCode:1348: static int __ip6_ins_rt(struct fib6_info *rt, struct nl_info *info,
1349: struct netlink_ext_ack *extack)
1350: {
1351: int err;
1352: struct fib6_table *table;
1353:
1354: table = rt->fib6_table;
1355: spin_lock_bh(&table->tb6_lock);
1356: err = fib6_add(&table->tb6_root, rt, info, extack);
1357: spin_unlock_bh(&table->tb6_lock);
1358:
1359: return err;
1360: }
SourceFile:net/ipv6/route.c]
|
| 87/2 |
2026/09/21 01:06 |
llm |
expert |
0m
Model:
Tokens:
input: 48394
output: 22
thoughts: 104
Thoughts: **Debugging a Potential NULL Dereference**
Okay, so I'm looking at this code and immediately see a potential issue. If `rt` is somehow NULL at this point, then dereferencing `rt->fib6_table` is going to crash, plain and simple. That's a classic null pointer dereference, and we need to prevent it. But, I'm thinking, this doesn't seem quite right. My initial analysis is that `IFA_F_OPTIMISTIC` isn't set, which is probably relevant, but then I remember that the reproducer *does* set `IFA_F_NODAD`, and I think that maybe that is relevant. Wait... Hang on, I've got my values mixed up - I'm thinking the values associated with the flags, and that could be my source of confusion. Let me just double-check the definitions of `IFA_F_NODAD` and `IFA_F_OPTIMISTIC` to make sure I'm not chasing a phantom. I need to make sure I understand the interaction between the flags before I get too deep into this.
|
| 88/2 |
2026/09/21 01:06 |
tool |
grepper |
0m
Error:
Args: map[Expression:#define IFA_F_NODAD]
Results:
|
| 89/2 |
2026/09/21 01:06 |
llm |
expert |
0m
Model:
Tokens:
input: 48772
output: 21
thoughts: 0
|
| 90/2 |
2026/09/21 01:06 |
tool |
grepper |
0m
Args: map[Expression:IFA_F_NODAD]
Results: map[Output:include/uapi/linux/if_addr.h=26=enum {
--
include/uapi/linux/if_addr.h-47-
include/uapi/linux/if_addr.h:48:#define IFA_F_NODAD 0x02
include/uapi/linux/if_addr.h-49-#define IFA_F_OPTIMISTIC 0x04
--
net/ipv4/devinet.c-66-#define IPV6ONLY_FLAGS \
net/ipv4/devinet.c:67: (IFA_F_NODAD | IFA_F_OPTIMISTIC | IFA_F_DADFAILED | \
net/ipv4/devinet.c-68- IFA_F_HOMEADDRESS | IFA_F_TENTATIVE | \
--
net/ipv6/addrconf.c=1074=ipv6_add_addr(struct inet6_dev *idev, struct ifa6_config *cfg,
--
net/ipv6/addrconf.c-1153- /* No need to add the TENTATIVE flag for addresses with NODAD */
net/ipv6/addrconf.c:1154: if (!(cfg->ifa_flags & IFA_F_NODAD))
net/ipv6/addrconf.c-1155- ifa->flags |= IFA_F_TENTATIVE;
--
net/ipv6/addrconf.c=3036=static int inet6_addr_add(struct net *net, struct net_device *dev,
--
net/ipv6/addrconf.c-3083- */
net/ipv6/addrconf.c:3084: if (!(ifp->flags & (IFA_F_OPTIMISTIC | IFA_F_NODAD)))
net/ipv6/addrconf.c-3085- ipv6_ifa_notify(0, ifp);
--
net/ipv6/addrconf.c=3875=static int addrconf_ifdown(struct net_device *dev, bool unregister)
--
net/ipv6/addrconf.c-3995- ifa->state = INET6_IFADDR_STATE_PREDAD;
net/ipv6/addrconf.c:3996: if (!(ifa->flags & IFA_F_NODAD))
net/ipv6/addrconf.c-3997- ifa->flags |= IFA_F_TENTATIVE;
--
net/ipv6/addrconf.c=4127=static void addrconf_dad_begin(struct inet6_ifaddr *ifp)
--
net/ipv6/addrconf.c-4145- !(ifp->flags&IFA_F_TENTATIVE) ||
net/ipv6/addrconf.c:4146: ifp->flags & IFA_F_NODAD) {
net/ipv6/addrconf.c-4147- bool send_na = false;
--
net/ipv6/addrconf.c=4887=static int inet6_addr_modify(struct net *net, struct inet6_ifaddr *ifp,
--
net/ipv6/addrconf.c-4914- !(ifp->flags & IFA_F_NOPREFIXROUTE);
net/ipv6/addrconf.c:4915: ifp->flags &= ~(IFA_F_DEPRECATED | IFA_F_PERMANENT | IFA_F_NODAD |
net/ipv6/addrconf.c-4916- IFA_F_HOMEADDRESS | IFA_F_MANAGETEMPADDR |
--
net/ipv6/addrconf.c=4984=inet6_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh,
--
net/ipv6/addrconf.c-5022- /* We ignore other flags so far. */
net/ipv6/addrconf.c:5023: cfg.ifa_flags &= IFA_F_NODAD | IFA_F_HOMEADDRESS |
net/ipv6/addrconf.c-5024- IFA_F_MANAGETEMPADDR | IFA_F_NOPREFIXROUTE |
--
net/ipv6/addrconf.c-5080-
net/ipv6/addrconf.c:5081: if (cfg.ifa_flags & IFA_F_NODAD &&
net/ipv6/addrconf.c-5082- cfg.ifa_flags & IFA_F_OPTIMISTIC) {
net/ipv6/addrconf.c:5083: NL_SET_ERR_MSG(extack, "IFA_F_NODAD and IFA_F_OPTIMISTIC are mutually exclusive");
net/ipv6/addrconf.c-5084- err = -EINVAL;
--
tools/include/uapi/linux/if_addr.h=26=enum {
--
tools/include/uapi/linux/if_addr.h-47-
tools/include/uapi/linux/if_addr.h:48:#define IFA_F_NODAD 0x02
tools/include/uapi/linux/if_addr.h-49-#define IFA_F_OPTIMISTIC 0x04
--
tools/testing/selftests/net/tcp_ao/lib/netlink.c=197=static int __ip_addr_add(int sock, uint32_t seq, const char *intf,
--
tools/testing/selftests/net/tcp_ao/lib/netlink.c-216- req.info.ifa_index = if_nametoindex(intf);
tools/testing/selftests/net/tcp_ao/lib/netlink.c:217: req.info.ifa_flags = IFA_F_NODAD;
tools/testing/selftests/net/tcp_ao/lib/netlink.c-218-
--
tools/testing/selftests/net/tuntap_helpers.h=47=static inline int ip_addr_add(const char *dev, int family, void *addr,
--
tools/testing/selftests/net/tuntap_helpers.h-50- int nl_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_EXCL;
tools/testing/selftests/net/tuntap_helpers.h:51: int ifa_flags = IFA_F_PERMANENT | IFA_F_NODAD;
tools/testing/selftests/net/tuntap_helpers.h-52- int ret = -1, ipalen = ip_addr_len(family);
]
|
| 91/2 |
2026/09/21 01:06 |
llm |
expert |
0m
Model:
Tokens:
input: 50438
output: 39
thoughts: 244
Thoughts: **Analyzing the Network Address Message**
Okay, so I'm looking at this reproducer and trying to figure out what's happening with this network address addition. The key question right now is whether it's sending `IFA_F_NODAD` (0x02) or perhaps 0x40. I need to nail down the exact flags involved.
Right, let's focus on the `RTM_NEWADDR` message from the reproducer. Here's what the data looks like:
```
// union ANYUNION {
// ANYBLOB: buffer: {14 00 01 00 20 01 00 00 00 00 00 00 00 00 00 00 00 00 00 fb c3 ef 54 ea 46 ad ee 6a 01} (length 0x1d)
// }
```
The first part, `{14 00 01 00}`, that has to be the `struct ifaddrmsg`. It's pretty clear. The `14` is length, which is expected. The `00` seems like a type, but I need to make sure I'm following the struct correctly. The `01 00` could be flags, but I'm doubting that. `struct ifaddrmsg` is only 8 bytes.
I need to confirm these bytes in `struct ifaddrmsg`. Let me check that quickly.
|
| 92/2 |
2026/09/21 01:07 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:include/uapi/linux/if_addr.h Name:ifaddrmsg]
Results: map[SourceCode: 8: struct ifaddrmsg {
9: __u8 ifa_family;
10: __u8 ifa_prefixlen; /* The prefix length */
11: __u8 ifa_flags; /* Flags */
12: __u8 ifa_scope; /* Address scope */
13: __u32 ifa_index; /* Link index */
14: };
SourceFile:include/uapi/linux/if_addr.h]
|
| 93/2 |
2026/09/21 01:07 |
llm |
expert |
0m
Model:
Tokens:
input: 51209
output: 41
thoughts: 1809
Thoughts: **Analyzing the IPv6 Address Assignment on the Loopback Interface**
Okay, let's break this down. The system receives an `ANYBLOB` buffer describing a new IPv6 address, specifically `2001::fb` with a prefix length of 64 on the `lo` interface. The key part is that `ifa_flags` is 0, which means that the interface is in the `IFA_F_TENTATIVE` state, not `IFA_F_NODAD`.
When the kernel processes this, `inet6_addr_add` is invoked with `ifa_flags == 0`. This sets `IFA_F_TENTATIVE` and `IFA_F_PERMANENT` in `ifa->flags`. Then, `addrconf_dad_start(ifp)` is called and a DAD (Duplicate Address Detection) work queue, namely `addrconf_dad_work`, is created.
The reproducer then uses `ioctl(SIOCSIFFLAGS)` to set the `IFF_UP` flag on the `lo` interface, and this is where it gets interesting. `lo` is often up by default, so setting `IFF_UP` might have no effect. The reproducer sets it to 1, then sets it to 0, which means it brings the interface down. When the `lo` interface is brought down, `addrconf_ifdown` is called.
Inside `addrconf_ifdown`, `keep_addr_on_down` is set to 1, so the address isn't removed at that point, instead, `ifa->state` is set to `INET6_IFADDR_STATE_PREDAD` and `ifa->flags |= IFA_F_TENTATIVE`. Critically, `ifa->rt` is set to NULL. The reproducer sets the interface up, then down.
Examining the reproducer's code, we can see it sets the `ifru_flags` to 1, which means `IFF_UP` and then to 0, bringing the interface down. This brings up the question, is `lo` up by default? If the interface is already up, setting `IFF_UP` just keeps it up. Bringing it down *after* is what matters.
The warning message "BUG: Address 2001::fb on device lo is missing its host route" is the key to understanding the problem. This message appears when `__ipv6_ifa_notify(RTM_NEWADDR, ifp)` is called, `ifp->rt` is NULL, and the interface is `IFF_UP`. This function is invoked from `addrconf_dad_completed`.
The problem occurs because with the loopback interface, `addrconf_dad_completed` is called almost immediately after the address is added because of `IFF_LOOPBACK`. The function `addrconf_dad_begin` calls `addrconf_dad_work` which is on a delayed work queue. If `lo` is brought DOWN, `addrconf_ifdown` is called which sets `ifp->rt = NULL` and calls `addrconf_del_dad_work(ifa)`. `addrconf_del_dad_work` calls `cancel_delayed_work(&ifa->dad_work)`. Here lies the crux of the race condition.
The function `cancel_delayed_work` *only cancels the timer* that's associated with `dad_work`. If `dad_work` is already *running*, the call to `cancel_delayed_work` does not wait for that to complete. Therefore, `addrconf_dad_completed` can still be called after we've set `ifa->rt = NULL`, and then `__ipv6_ifa_notify()` is called with `ifp->rt` set to NULL which generates the warning. Let's delve deeper into `addrconf_del_dad_work` and see how to get there.
|
| 94/2 |
2026/09/21 01:07 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addrconf_del_dad_work]
Results: map[SourceCode: 323: static void addrconf_del_dad_work(struct inet6_ifaddr *ifp)
324: {
325: if (cancel_delayed_work(&ifp->dad_work))
326: __in6_ifa_put(ifp);
327: }
SourceFile:net/ipv6/addrconf.c]
|
| 95/2 |
2026/09/21 01:07 |
llm |
expert |
0m
Model:
Tokens:
input: 54024
output: 39
thoughts: 75
Thoughts: Here's my take on those thoughts:
**Analyzing `cancel_delayed_work` and `addrconf_dad_work`**
Okay, so `cancel_delayed_work` clearly doesn't block β it just signals the work to stop, but any currently executing instance will finish. That much is straightforward. I'm wondering about the interaction with `addrconf_dad_work` though. If it's already running, it'll just keep chugging along, which is expected behavior for this type of mechanism.
Wait a secondβ¦ does `addrconf_dad_work` grab `rtnl_lock()` at the very beginning orβ¦ah, right, I need to look into its implementation to be sure. It *looks* like it grabs it internally. Okay, let's just confirm that by diving into the `addrconf_dad_work` function itself. I need to refresh my memory on the locking order there. No point speculating when I can verify. Let's see...
|
| 96/2 |
2026/09/21 01:07 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addrconf_dad_work]
Results: map[SourceCode:4211: static void addrconf_dad_work(struct work_struct *w)
4212: {
4213: struct inet6_ifaddr *ifp = container_of(to_delayed_work(w),
4214: struct inet6_ifaddr,
4215: dad_work);
4216: struct inet6_dev *idev = ifp->idev;
4217: bool bump_id, disable_ipv6 = false;
4218: struct in6_addr mcaddr;
4219: struct net *net;
4220:
4221: enum {
4222: DAD_PROCESS,
4223: DAD_BEGIN,
4224: DAD_ABORT,
4225: } action = DAD_PROCESS;
4226:
4227: net = dev_net(idev->dev);
4228:
4229: rtnl_net_lock(net);
4230:
4231: spin_lock_bh(&ifp->lock);
4232: if (ifp->state == INET6_IFADDR_STATE_PREDAD) {
4233: action = DAD_BEGIN;
4234: ifp->state = INET6_IFADDR_STATE_DAD;
4235: } else if (ifp->state == INET6_IFADDR_STATE_ERRDAD) {
4236: action = DAD_ABORT;
4237: ifp->state = INET6_IFADDR_STATE_POSTDAD;
4238:
4239: if ((READ_ONCE(net->ipv6.devconf_all->accept_dad) > 1 ||
4240: READ_ONCE(idev->cnf.accept_dad) > 1) &&
4241: !idev->cnf.disable_ipv6 &&
4242: !(ifp->flags & IFA_F_STABLE_PRIVACY)) {
4243: struct in6_addr addr;
4244:
4245: addr.s6_addr32[0] = htonl(0xfe800000);
4246: addr.s6_addr32[1] = 0;
4247:
4248: if (!ipv6_generate_eui64(addr.s6_addr + 8, idev->dev) &&
4249: ipv6_addr_equal(&ifp->addr, &addr)) {
4250: /* DAD failed for link-local based on MAC */
4251: WRITE_ONCE(idev->cnf.disable_ipv6, 1);
4252:
4253: pr_info("%s: IPv6 being disabled!\n",
4254: ifp->idev->dev->name);
4255: disable_ipv6 = true;
4256: }
4257: }
4258: }
4259: spin_unlock_bh(&ifp->lock);
4260:
4261: if (action == DAD_BEGIN) {
4262: addrconf_dad_begin(ifp);
4263: goto out;
4264: } else if (action == DAD_ABORT) {
4265: in6_ifa_hold(ifp);
4266: addrconf_dad_stop(ifp, 1);
4267: if (disable_ipv6)
4268: addrconf_ifdown(idev->dev, false);
4269: goto out;
4270: }
4271:
4272: if (!ifp->dad_probes && addrconf_dad_end(ifp))
4273: goto out;
4274:
4275: write_lock_bh(&idev->lock);
4276: if (idev->dead || !(idev->if_flags & IF_READY)) {
4277: write_unlock_bh(&idev->lock);
4278: goto out;
4279: }
4280:
4281: spin_lock(&ifp->lock);
4282: if (ifp->state == INET6_IFADDR_STATE_DEAD) {
4283: spin_unlock(&ifp->lock);
4284: write_unlock_bh(&idev->lock);
4285: goto out;
4286: }
4287:
4288: if (ifp->dad_probes == 0) {
4289: bool send_na = false;
4290:
4291: /*
4292: * DAD was successful
4293: */
4294:
4295: if (ifp->flags & IFA_F_TENTATIVE &&
4296: !(ifp->flags & IFA_F_OPTIMISTIC))
4297: send_na = true;
4298: bump_id = ifp->flags & IFA_F_TENTATIVE;
4299: ifp->flags &= ~(IFA_F_TENTATIVE|IFA_F_OPTIMISTIC|IFA_F_DADFAILED);
4300: spin_unlock(&ifp->lock);
4301: write_unlock_bh(&idev->lock);
4302:
4303: addrconf_dad_completed(ifp, bump_id, send_na);
4304:
4305: goto out;
4306: }
4307:
4308: ifp->dad_probes--;
4309: addrconf_mod_dad_work(ifp,
4310: max(NEIGH_VAR(ifp->idev->nd_parms, RETRANS_TIME),
4311: HZ/100));
4312: spin_unlock(&ifp->lock);
4313: write_unlock_bh(&idev->lock);
4314:
4315: /* send a neighbour solicitation for our addr */
4316: addrconf_addr_solict_mult(&ifp->addr, &mcaddr);
4317: ndisc_send_ns(ifp->idev->dev, &ifp->addr, &mcaddr, &in6addr_any,
4318: ifp->dad_nonce);
4319: out:
4320: in6_ifa_put(ifp);
4321: rtnl_net_unlock(net);
4322: }
SourceFile:net/ipv6/addrconf.c]
|
| 97/2 |
2026/09/21 01:07 |
llm |
expert |
0m
Model:
Tokens:
input: 56142
output: 39
thoughts: 148
Thoughts: **Concurreny Concerns in IPv6 Address Configuration**
Okay, so I'm looking at this IPv6 address configuration code and trying to suss out potential concurrency issues. Specifically, I'm thinking about how `addrconf_dad_work` and `addrconf_ifdown` interact. I see that `addrconf_dad_work` acquires `rtnl_net_lock(net)`. Then, I remember that `addrconf_ifdown` gets called from `addrconf_notify` β often through a `NETDEV_DOWN` event β which is itself called *with* `rtnl_lock()` already held.
The key here is whether both functions are using the same lock. It *looks* like they're both using some form of the RTNL lock, either `rtnl_lock()` or something similar, like `rtnl_net_lock`. If that's the case, and assuming the same lock is used, then the system *shouldn't* allow them to run concurrently, which is good. That would be a straightforward and safe design.
Wait, am I misremembering something about `rtnl_net_lock`? I could have sworn that `rtnl_net_lock(net)` was actually implemented as `mutex_lock(&net->ipv6.rtnl_net_lock)`. But now I'm not so sure. Did I conflate them? Perhaps `rtnl_net_lock` *is* just a wrapper for `rtnl_lock()`. I need to confirm this. I need to go and check the definition of `rtnl_net_lock` to be absolutely sure what's going on under the hood and make sure my assumptions are correct. No need to introduce a subtle race condition that will lead to intermittent and difficult to debug problems.
|
| 98/2 |
2026/09/21 01:07 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:rtnl_net_lock]
Results: map[SourceCode: 128: static inline void rtnl_net_lock(struct net *net)
129: {
130: rtnl_lock();
131: }
SourceFile:include/linux/rtnetlink.h]
|
| 99/2 |
2026/09/21 01:07 |
llm |
expert |
0m
Model:
Tokens:
input: 56797
output: 39
thoughts: 1270
Thoughts: **Analyzing the Potential Race Condition in IPv6 Address Configuration**
Okay, let's break this down. My initial thought is that `rtnl_net_lock` *is* `rtnl_lock()`, that's a key piece of information. This means `addrconf_dad_work` and `addrconf_ifdown` cannot run at the same time, which is important for understanding the race. The perplexing thing is, given this mutual exclusion, how does `ifp->rt` end up as NULL *while* `IFF_UP` is still set? That's what I need to figure out.
Alright, let's step through the events chronologically:
1. `inet6_rtm_newaddr` is the address addition. It sets `ifa->flags` to `IFA_F_PERMANENT | IFA_F_TENTATIVE`. Critically, it allocates `ifa->rt` (the route). Then, it kicks off `addrconf_dad_start`. This sets `ifa->state` to `INET6_IFADDR_STATE_PREDAD` and queues `addrconf_dad_work`. So, there's a scheduled job about to run.
2. Now, `ioctl(SIOCSIFFLAGS)` with `IFF_UP` is called on the loopback device (`lo`). This brings `lo` UP. This triggers a `NETDEV_UP` event, which in turn calls `addrconf_permanent_addr` and then `fixup_permanent_addr`. The important thing here is that `ifp->rt` is *already* allocated, so it doesn't get re-allocated. `ifp->state` is `INET6_IFADDR_STATE_PREDAD`, so the code calls `addrconf_dad_start` again, but this just re-schedules the work. So far, so good.
3. Next, `ioctl(SIOCSIFFLAGS)` with the DOWN flag is called on `lo`. This triggers the `NETDEV_DOWN` event, which means `addrconf_ifdown` gets called. Since `keep_addr_on_down` is set to 1, the address is kept. That's *important*. It sets `ifa->state = INET6_IFADDR_STATE_PREDAD`. Critically, it sets `ifa->flags |= IFA_F_TENTATIVE` and `ifa->rt = NULL`. Finally, it calls `addrconf_del_dad_work(ifa)`, which cancels the delayed work via `cancel_delayed_work(&ifa->dad_work)`. The route is nullified, and the work is cancelled.
4. Here's where the race *might* happen. The question is, what if `addrconf_dad_work` was already running when `lo` was brought DOWN? `addrconf_dad_work` takes `rtnl_lock()`. The `ioctl(SIOCSIFFLAGS)` call (which takes `lo` DOWN) *also* takes `rtnl_lock()`. This means `addrconf_dad_work` must finish *before* `lo` can be brought DOWN, *or* `lo` must be brought DOWN before `addrconf_dad_work` gets to start.
Let's follow both execution paths:
* If `addrconf_dad_work` runs FIRST: It sets `ifa->state = INET6_IFADDR_STATE_DAD` and calls `addrconf_dad_begin(ifp)`. Since `lo` is a loopback device, `addrconf_dad_begin` calls `addrconf_dad_completed`. That clears `IFA_F_TENTATIVE` and calls `ipv6_ifa_notify(RTM_NEWADDR, ifp)`. `__ipv6_ifa_notify` *inserts the route*. Then, `addrconf_dad_work` releases the lock. Then, `ioctl` brings `lo` DOWN. `addrconf_ifdown` sets `ifa->state = INET6_IFADDR_STATE_PREDAD`, `ifa->flags |= IFA_F_TENTATIVE`, and `ifa->rt = NULL`. `addrconf_del_dad_work` does nothing because the work is already complete.
* If `ioctl` brings `lo` DOWN FIRST: `addrconf_ifdown` sets `ifa->state = INET6_IFADDR_STATE_PREDAD`, `ifa->flags |= IFA_F_TENTATIVE`, and `ifa->rt = NULL`. Then, `addrconf_del_dad_work` cancels the work. So `addrconf_dad_work` *never* runs.
This seems to
|
| 100/2 |
2026/09/21 01:08 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:fixup_permanent_addr]
Results: map[SourceCode:3600: static int fixup_permanent_addr(struct net *net,
3601: struct inet6_dev *idev,
3602: struct inet6_ifaddr *ifp)
3603: {
3604: /* !fib6_node means the host route was removed from the
3605: * FIB, for example, if 'lo' device is taken down. In that
3606: * case regenerate the host route.
3607: */
3608: if (!ifp->rt || !ifp->rt->fib6_node) {
3609: struct fib6_info *f6i, *prev;
3610:
3611: f6i = addrconf_f6i_alloc(net, idev, &ifp->addr, false,
3612: GFP_KERNEL, NULL);
3613: if (IS_ERR(f6i))
3614: return PTR_ERR(f6i);
3615:
3616: /* ifp->rt can be accessed outside of rtnl */
3617: spin_lock_bh(&ifp->lock);
3618: prev = ifp->rt;
3619: ifp->rt = f6i;
3620: spin_unlock_bh(&ifp->lock);
3621:
3622: fib6_info_release(prev);
3623: }
3624:
3625: if (!(ifp->flags & IFA_F_NOPREFIXROUTE)) {
3626: addrconf_prefix_route(&ifp->addr, ifp->prefix_len,
3627: ifp->rt_priority, idev->dev, 0, 0,
3628: GFP_KERNEL);
3629: }
3630:
3631: if (ifp->state == INET6_IFADDR_STATE_PREDAD)
3632: addrconf_dad_start(ifp);
3633:
3634: return 0;
3635: }
SourceFile:net/ipv6/addrconf.c]
|
| 101/2 |
2026/09/21 01:08 |
llm |
expert |
0m
Model:
Tokens:
input: 59726
output: 39
thoughts: 113
Thoughts: **Investigating a Potential Race Condition in IPv6 Address Assignment**
Okay, so I'm digging into this IPv6 address assignment process, specifically focusing on `fixup_permanent_addr`. This function allocates a new route and correctly sets `ifp->rt` to `f6i`, which seems straightforward. Then it calls `addrconf_dad_start`, which subsequently queues up the `addrconf_dad_work` task. Now, here's where my alarm bells are going off. If `fixup_permanent_addr` *just* assigned a route to `ifp->rt`, how in the world can `ifp->rt` possibly be NULL when `__ipv6_ifa_notify` is eventually called? That just doesn't make sense. There has to be a race condition, a timing issue, or a subtle bug somewhere. Let's backtrack and dive directly into `addrconf_dad_start` to understand *exactly* what's happening there and see if we can identify the vulnerability.
|
| 102/2 |
2026/09/21 01:08 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addrconf_dad_start]
Results: map[SourceCode:4196: static void addrconf_dad_start(struct inet6_ifaddr *ifp)
4197: {
4198: bool begin_dad = false;
4199:
4200: spin_lock_bh(&ifp->lock);
4201: if (ifp->state != INET6_IFADDR_STATE_DEAD) {
4202: ifp->state = INET6_IFADDR_STATE_PREDAD;
4203: begin_dad = true;
4204: }
4205: spin_unlock_bh(&ifp->lock);
4206:
4207: if (begin_dad)
4208: addrconf_mod_dad_work(ifp, 0);
4209: }
SourceFile:net/ipv6/addrconf.c]
|
| 103/2 |
2026/09/21 01:08 |
llm |
expert |
0m
Model:
Tokens:
input: 60338
output: 38
thoughts: 1313
Thoughts: **Analyzing the Potential Race Condition in IPv6 DAD Implementation**
Okay, so I'm looking at how Duplicate Address Detection (DAD) works in this IPv6 setup, specifically concerning the interaction between bringing an interface up and down, and how `addrconf_dad_work` is scheduled and executed. My primary concern is the potential for a race condition, particularly around the `rtnl_lock()` and the interface state.
The core of the problem seems to be that `addrconf_mod_dad_work` could re-queue `addrconf_dad_work` if it's already running. I've walked through a few scenarios to understand this better. First, I see the typical sequence: interface comes up, DAD starts, DAD completes, and then the IPv6 route is inserted. All good so far.
Then I get to the tricky parts. If the interface goes down while DAD is in progress, `addrconf_ifdown` sets `ifp->rt` to NULL and tries to cancel the work. In scenario 5, if the interface is brought down *before* the DAD work starts, `cancel_delayed_work` should prevent it from running. However, in scenario 6, the DAD work is *running* but blocked on the lock when `addrconf_ifdown` is called. `cancel_delayed_work` returns false here since it is running, meaning the work will continue even though `ifp->rt` is NULL.
This is where things get interesting. I see that the work continues, but, crucially, checks `ifp->state` is `INET6_IFADDR_STATE_PREDAD`. This means the work continues on the down interface. But because the interface is down, a crucial check `!ifp->rt && (ifp->idev->dev->flags & IFF_UP)` is meant to warn, but the check fails when the interface is brought down.
Now, I'm thinking about the order of operations when the interface goes down and then back up, concurrently to DAD processing. The question is who gets the lock first: DAD or UP. I walk through a scenario where a down, up transition takes place before DAD can acquire the lock. It looks like the critical section is the interaction between `addrconf_dad_work` and `ioctl(UP)` because they both are competing for `rtnl_lock()`.
Scenario 7: It seems that the warning is not triggered when the interface is down, because the code does not print the warning.
I'm starting to get a good handle on this. The main issue seems to be a race condition when the network interface is brought down and then up again rapidly, especially when DAD is still pending or running. The `rtnl_lock()` is the key to preventing a race, and the state of `ifp->rt` and `IFF_UP` needs careful synchronization. I need to think this through in more detail to determine how to guard against this condition and prevent a warning from not printing when it should. The real problem is around how `addrconf_dad_work` interacts with the state of the interface and `rtnl_lock()`.
|
| 104/2 |
2026/09/21 01:08 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addrconf_ifdown]
Results: map[SourceCode:3875: static int addrconf_ifdown(struct net_device *dev, bool unregister)
3876: {
3877: unsigned long event = unregister ? NETDEV_UNREGISTER : NETDEV_DOWN;
3878: struct net *net = dev_net(dev);
3879: struct inet6_dev *idev;
3880: struct inet6_ifaddr *ifa;
3881: LIST_HEAD(tmp_addr_list);
3882: bool keep_addr = false;
3883: bool was_ready;
3884: int state, i;
3885:
3886: ASSERT_RTNL();
3887:
3888: rt6_disable_ip(dev, event);
3889:
3890: idev = __in6_dev_get(dev);
3891: if (!idev)
3892: return -ENODEV;
3893:
3894: /*
3895: * Step 1: remove reference to ipv6 device from parent device.
3896: * Do not dev_put!
3897: */
3898: if (unregister) {
3899: WRITE_ONCE(idev->dead, 1);
3900:
3901: /* protected by rtnl_lock */
3902: RCU_INIT_POINTER(dev->ip6_ptr, NULL);
3903:
3904: /* Step 1.5: remove snmp6 entry */
3905: snmp6_unregister_dev(idev);
3906:
3907: }
3908:
3909: /* combine the user config with event to determine if permanent
3910: * addresses are to be removed from address hash table
3911: */
3912: if (!unregister && !idev->cnf.disable_ipv6) {
3913: /* aggregate the system setting and interface setting */
3914: int _keep_addr = READ_ONCE(net->ipv6.devconf_all->keep_addr_on_down);
3915:
3916: if (!_keep_addr)
3917: _keep_addr = READ_ONCE(idev->cnf.keep_addr_on_down);
3918:
3919: keep_addr = (_keep_addr > 0);
3920: }
3921:
3922: /* Step 2: clear hash table */
3923: for (i = 0; i < IN6_ADDR_HSIZE; i++) {
3924: struct hlist_head *h = &net->ipv6.inet6_addr_lst[i];
3925:
3926: spin_lock_bh(&net->ipv6.addrconf_hash_lock);
3927: restart:
3928: hlist_for_each_entry_rcu(ifa, h, addr_lst) {
3929: if (ifa->idev == idev) {
3930: addrconf_del_dad_work(ifa);
3931: /* combined flag + permanent flag decide if
3932: * address is retained on a down event
3933: */
3934: if (!keep_addr ||
3935: !(ifa->flags & IFA_F_PERMANENT) ||
3936: addr_is_local(&ifa->addr)) {
3937: hlist_del_init_rcu(&ifa->addr_lst);
3938: goto restart;
3939: }
3940: }
3941: }
3942: spin_unlock_bh(&net->ipv6.addrconf_hash_lock);
3943: }
3944:
3945: write_lock_bh(&idev->lock);
3946:
3947: addrconf_del_rs_timer(idev);
3948:
3949: /* Step 2: clear flags for stateless addrconf, repeated down
3950: * detection
3951: */
3952: was_ready = idev->if_flags & IF_READY;
3953: if (!unregister)
3954: idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD|IF_READY);
3955:
3956: /* Step 3: clear tempaddr list */
3957: while (!list_empty(&idev->tempaddr_list)) {
3958: ifa = list_first_entry(&idev->tempaddr_list,
3959: struct inet6_ifaddr, tmp_list);
3960: list_del(&ifa->tmp_list);
3961: write_unlock_bh(&idev->lock);
3962: spin_lock_bh(&ifa->lock);
3963:
3964: if (ifa->ifpub) {
3965: in6_ifa_put(ifa->ifpub);
3966: ifa->ifpub = NULL;
3967: }
3968: spin_unlock_bh(&ifa->lock);
3969: in6_ifa_put(ifa);
3970: write_lock_bh(&idev->lock);
3971: }
3972:
3973: list_for_each_entry(ifa, &idev->addr_list, if_list)
3974: list_add_tail(&ifa->if_list_aux, &tmp_addr_list);
3975: write_unlock_bh(&idev->lock);
3976:
3977: while (!list_empty(&tmp_addr_list)) {
3978: struct fib6_info *rt = NULL;
3979: bool keep;
3980:
3981: ifa = list_first_entry(&tmp_addr_list,
3982: struct inet6_ifaddr, if_list_aux);
3983: list_del(&ifa->if_list_aux);
3984:
3985: addrconf_del_dad_work(ifa);
3986:
3987: keep = keep_addr && (ifa->flags & IFA_F_PERMANENT) &&
3988: !addr_is_local(&ifa->addr);
3989:
3990: spin_lock_bh(&ifa->lock);
3991:
3992: if (keep) {
3993: /* set state to skip the notifier below */
3994: state = INET6_IFADDR_STATE_DEAD;
3995: ifa->state = INET6_IFADDR_STATE_PREDAD;
3996: if (!(ifa->flags & IFA_F_NODAD))
3997: ifa->flags |= IFA_F_TENTATIVE;
3998:
3999: rt = ifa->rt;
4000: ifa->rt = NULL;
4001: } else {
4002: state = ifa->state;
4003: ifa->state = INET6_IFADDR_STATE_DEAD;
4004: }
4005:
4006: spin_unlock_bh(&ifa->lock);
4007:
4008: if (rt)
4009: ip6_del_rt(net, rt, false);
4010:
4011: if (state != INET6_IFADDR_STATE_DEAD) {
4012: __ipv6_ifa_notify(RTM_DELADDR, ifa);
4013: inet6addr_notifier_call_chain(NETDEV_DOWN, ifa);
4014: } else {
4015: if (idev->cnf.forwarding)
4016: addrconf_leave_anycast(ifa);
4017: addrconf_leave_solict(ifa->idev, &ifa->addr);
4018: }
4019:
4020: if (!keep) {
4021: write_lock_bh(&idev->lock);
4022: list_del_rcu(&ifa->if_list);
4023: write_unlock_bh(&idev->lock);
4024: in6_ifa_put(ifa);
4025: }
4026: }
4027:
4028: /* Step 5: Discard anycast and multicast list */
4029: if (unregister) {
4030: ipv6_ac_destroy_dev(idev);
4031: ipv6_mc_destroy_dev(idev);
4032: } else if (was_ready) {
4033: ipv6_mc_down(idev);
4034: }
4035:
4036: WRITE_ONCE(idev->tstamp, jiffies);
4037: idev->ra_mtu = 0;
4038:
4039: /* Last: Shot the device (if unregistered) */
4040: if (unregister) {
4041: addrconf_sysctl_unregister(idev);
4042: neigh_parms_release(&nd_tbl, idev->nd_parms);
4043: neigh_ifdown(&nd_tbl, dev);
4044: in6_dev_put(idev);
4045: }
4046: return 0;
4047: }
SourceFile:net/ipv6/addrconf.c]
|
| 105/2 |
2026/09/21 01:08 |
llm |
expert |
0m
Model:
Tokens:
input: 64971
output: 39
thoughts: 832
Thoughts: **Analyzing a Potential Race Condition in IPv6 Address Configuration**
Okay, let's break this down. In `addrconf_ifdown`, I see this conditional block when `keep` is true: it sets a "dead" state for the interface address (`ifa`), potentially marking it as tentative if it's not already in a DoA state, and crucially, it sets `ifa->rt = NULL`. But, hang on... `addrconf_del_dad_work(ifa)` is called *before* a spinlock is acquired on `ifa->lock`. This seems odd because `addrconf_dad_work` itself takes the `rtnl_lock()`. And `addrconf_ifdown` is called with that `rtnl_lock()` already held.
So, the naive assumption is that concurrent execution of the `addrconf_dad_work` is impossible. However, then I realize: `addrconf_dad_work` is a *delayed* work. Ah! if `addrconf_del_dad_work` is called, it should call `cancel_delayed_work`, right? And if the work is pending, it's cancelled. If not, it does nothing. But, what if `cancel_delayed_work` *returns false*? It returns false if the work wasn't pending. Could the work be re-queued *after* `addrconf_del_dad_work`? No, since I have the `rtnl_lock()` I can be sure that this can't happen.
But wait! What about `addrconf_dad_work` being queued by `addrconf_dad_start` in `fixup_permanent_addr`? Ah, `fixup_permanent_addr` is called from `addrconf_permanent_addr`, which is called from `addrconf_notify(NETDEV_UP)`. If `lo` is brought up, `fixup_permanent_addr` sets `ifa->rt = f6i` and *then* calls `addrconf_dad_start`, which queues `addrconf_dad_work`. Then, `lo` is brought *down*. `addrconf_ifdown` cancels the work and sets `ifa->rt = NULL`. But, then, `lo` is brought *up* again! `fixup_permanent_addr` sets `ifa->rt = f6i` and queues the work *again*. So, `ifa->rt` should NEVER be NULL when `addrconf_dad_work` runs! That's... reassuring.
Okay, let's step back, is there any other way `addrconf_dad_work` could run when `ifa->rt` is NULL? What if `fixup_permanent_addr` *fails* to allocate `f6i`? The code does check for this:
```c
if (!ifp->rt || !ifp->rt->fib6_node) {
struct fib6_info *f6i, *prev;
f6i = addrconf_f6i_alloc(net, idev, &ifp->addr, false,
GFP_KERNEL, NULL);
if (IS_ERR(f6i))
return PTR_ERR(f6i);
```
If `addrconf_f6i_alloc` fails, `fixup_permanent_addr` *returns an error*! And `addrconf_dad_start` is *not* called! So, `addrconf_dad_work` is *not* queued. Okay, so if it fails, then we are not scheduled.
But wait... if `fixup_permanent_addr` returns an error, does `addrconf_permanent_addr` just ignore it? I need to check `addrconf_permanent_addr` now to be sure.
|
| 106/2 |
2026/09/21 01:08 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addrconf_permanent_addr]
Results: map[SourceCode:3637: static void addrconf_permanent_addr(struct net *net, struct net_device *dev)
3638: {
3639: struct inet6_ifaddr *ifp;
3640: LIST_HEAD(tmp_addr_list);
3641: struct inet6_dev *idev;
3642:
3643: /* Mutual exclusion with other if_list_aux users. */
3644: ASSERT_RTNL();
3645:
3646: idev = __in6_dev_get(dev);
3647: if (!idev)
3648: return;
3649:
3650: write_lock_bh(&idev->lock);
3651: list_for_each_entry(ifp, &idev->addr_list, if_list) {
3652: if (ifp->flags & IFA_F_PERMANENT)
3653: list_add_tail(&ifp->if_list_aux, &tmp_addr_list);
3654: }
3655: write_unlock_bh(&idev->lock);
3656:
3657: while (!list_empty(&tmp_addr_list)) {
3658: ifp = list_first_entry(&tmp_addr_list,
3659: struct inet6_ifaddr, if_list_aux);
3660: list_del(&ifp->if_list_aux);
3661:
3662: if (fixup_permanent_addr(net, idev, ifp) < 0) {
3663: net_info_ratelimited("%s: Failed to add prefix route for address %pI6c; dropping\n",
3664: idev->dev->name, &ifp->addr);
3665: in6_ifa_hold(ifp);
3666: ipv6_del_addr(ifp);
3667: }
3668: }
3669: }
SourceFile:net/ipv6/addrconf.c]
|
| 107/2 |
2026/09/21 01:08 |
llm |
expert |
0m
Model:
Tokens:
input: 67237
output: 57
thoughts: 4017
Thoughts: **Deep Dive into a Race Condition**
Okay, so I'm thinking through this IPv6 address configuration and I've got a head-scratcher. The core issue seems to revolve around a potential race condition between bringing an interface down, the Duplicate Address Detection (DAD) process, and the notification of address changes. If `fixup_permanent_addr` fails, we know `ipv6_del_addr` is called, but that's not the problem here.
The crux of the matter appears to be this sequence: an address is added, DAD is queued (workqueue). Then we bring the interface down, which calls `addrconf_del_dad_work` *before* the `ifa->rt = NULL`. Now, the code has `keep` logic which might decide to keep the address in a DEAD state. The critical thing here is that `addrconf_del_dad_work` cancels a delayed work, but what if that work has already started but is waiting on a lock?
I have to trace this, considering all the possible execution orders and what is held. `addrconf_ifdown` and `addrconf_dad_work` both take `rtnl_lock()`. If `addrconf_dad_work` is already *running* (blocked by `rtnl_lock()`), the attempt to cancel it will fail. Then, `addrconf_ifdown` sets `ifa->rt = NULL` and releases `rtnl_lock()`. The DAD worker thread will acquire `rtnl_lock()`, and continue execution. The interface state is now DEAD, but `ifa->rt` is NULL.
I went through the steps again: `lo` is UP, address added, DAD queued. The worker blocks on `rtnl_lock()`. `ioctl(DOWN)` is called, `addrconf_del_dad_work` cancels delayed work (fails since its already executing), `addrconf_ifdown` does its thing, sets `ifa->rt = NULL`. Then the worker reacquires the lock, sees the DEAD state, and proceeds with DAD anyway. It will call `ipv6_ifa_notify(RTM_NEWADDR, ifp)`. Now, the problem!
If the down interface has not been brought back up yet, `IFF_UP` will not be set, and the warning won't trigger. So far so good.
Now, what if `ioctl(UP)` is called immediately after `ioctl(DOWN)` and *before* DAD finishes? If `ioctl(UP)` takes the lock, it can call `fixup_permanent_addr` which will re-initialize `ifa->rt`. So, when the worker finally calls `__ipv6_ifa_notify`, `ifa->rt` will be *not* NULL.
I also thought through the implications of changing `keep_addr_on_down`, but that doesn't change execution flow.
Now, what if `addrconf_dad_work` is blocked, but `ioctl(UP)` is called? `addrconf_dad_work` continues and *after* the iface is up. Does that work? Nope, `ioctl(UP)` holds the `rtnl_lock()` and sets `IFF_UP`.
Then the thought of the `ifp->flags & IFA_F_NODAD` in `addrconf_dad_begin`. That could be relevant. But it's not set from the repro itself.
So I looked at the repro. I traced the netlink messages to look at flags, and found that the first `ANYBLOB` message is `RTM_NEWLINK` which brings the link up. The second is the `RTM_NEWADDR` message that sets the address. The `ifa_flags` field is zero. So, this doesn't help.
I needed to see what other call paths to `ipv6_ifa_notify` there are.
So, in conclusion, it seems to me, the only way to avoid the warning is if the interface is brought DOWN, the workqueue is started, and the `iff_up` has not been set yet when the workqueue calls `ipv6_ifa_notify`!
|
| 108/2 |
2026/09/21 01:09 |
tool |
codesearch-find-references |
0m
Args: map[ContextFile:net/ipv6/addrconf.c IncludeSnippetLines:0 Name:ipv6_ifa_notify SourceTreePrefix:net/ipv6/]
Results: map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:add_addr SourceFile:net/ipv6/addrconf.c SourceLine:3230] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:addrconf_dad_begin SourceFile:net/ipv6/addrconf.c SourceLine:4193] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:addrconf_dad_completed SourceFile:net/ipv6/addrconf.c SourceLine:4355] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:addrconf_dad_stop SourceFile:net/ipv6/addrconf.c SourceLine:2151] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:addrconf_prefix_rcv_add_addr SourceFile:net/ipv6/addrconf.c SourceLine:2783] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:addrconf_verify_rtnl SourceFile:net/ipv6/addrconf.c SourceLine:4734] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:inet6_addr_add SourceFile:net/ipv6/addrconf.c SourceLine:3085] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:inet6_addr_modify SourceFile:net/ipv6/addrconf.c SourceLine:4932] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:ipv6_del_addr SourceFile:net/ipv6/addrconf.c SourceLine:1346] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:manage_tempaddrs SourceFile:net/ipv6/addrconf.c SourceLine:2666]] TruncatedOutput:false]
|
| 109/2 |
2026/09/21 01:09 |
llm |
expert |
0m
Model:
Tokens:
input: 72757
output: 40
thoughts: 13
Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience:
**Diving into `addrconf_verify_rtnl`**
Alright, let's get down to brass tacks. My initial thought process is to home in on `addrconf_verify_rtnl`. Given my expertise, I immediately understand this likely relates to address configuration, specifically within the realm of the Netlink route netlink (rtnl) subsystem. It's the verification aspect that immediately piques my interest. What specific criteria or checks is this function implementing? Are we talking about basic sanity checks on the incoming address information from the kernel? Is it scrutinizing the source of the address configuration itself? Perhaps it's validating the relationship between addresses and routes, or checking against configured policies and rules.
I'm mentally preparing for a deep dive. I'll need to understand the data structures involvedβspecifically, how the address information is represented and how it's being passed in. Are we dealing with `struct nlmsghdr`, `struct ifaddrmsg`, and potentially some ancillary attributes within the Netlink message? I also anticipate the possible use of helper functions, potentially kernel-internal, that `addrconf_verify_rtnl` might call to perform these checks. The overall context of how the function is invoked is critical. Is this triggered synchronously during a Netlink message handling path, or asynchronously in response to some other event? This directly influences the constraints on what operations are permissible inside this function (e.g., locking considerations, potential for blocking). I'll have to consider all of these things.
|
| 110/2 |
2026/09/21 01:09 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addrconf_verify_rtnl]
Results: map[SourceCode:4643: static void addrconf_verify_rtnl(struct net *net)
4644: {
4645: unsigned long now, next, next_sec, next_sched;
4646: struct inet6_ifaddr *ifp;
4647: int i;
4648:
4649: ASSERT_RTNL();
4650:
4651: rcu_read_lock_bh();
4652: now = jiffies;
4653: next = round_jiffies_up(now + ADDR_CHECK_FREQUENCY);
4654:
4655: cancel_delayed_work(&net->ipv6.addr_chk_work);
4656:
4657: for (i = 0; i < IN6_ADDR_HSIZE; i++) {
4658: restart:
4659: hlist_for_each_entry_rcu_bh(ifp, &net->ipv6.inet6_addr_lst[i], addr_lst) {
4660: unsigned long age;
4661:
4662: /* When setting preferred_lft to a value not zero or
4663: * infinity, while valid_lft is infinity
4664: * IFA_F_PERMANENT has a non-infinity life time.
4665: */
4666: if ((ifp->flags & IFA_F_PERMANENT) &&
4667: (ifp->prefered_lft == INFINITY_LIFE_TIME))
4668: continue;
4669:
4670: spin_lock(&ifp->lock);
4671: /* We try to batch several events at once. */
4672: age = (now - ifp->tstamp + ADDRCONF_TIMER_FUZZ_MINUS) / HZ;
4673:
4674: if ((ifp->flags&IFA_F_TEMPORARY) &&
4675: !(ifp->flags&IFA_F_TENTATIVE) &&
4676: ifp->prefered_lft != INFINITY_LIFE_TIME &&
4677: !ifp->regen_count && ifp->ifpub) {
4678: /* This is a non-regenerated temporary addr. */
4679:
4680: unsigned long regen_advance = ipv6_get_regen_advance(ifp->idev);
4681:
4682: if (age + regen_advance >= ifp->prefered_lft) {
4683: struct inet6_ifaddr *ifpub = ifp->ifpub;
4684: if (time_before(ifp->tstamp + ifp->prefered_lft * HZ, next))
4685: next = ifp->tstamp + ifp->prefered_lft * HZ;
4686:
4687: ifp->regen_count++;
4688: in6_ifa_hold(ifp);
4689: in6_ifa_hold(ifpub);
4690: spin_unlock(&ifp->lock);
4691:
4692: spin_lock(&ifpub->lock);
4693: ifpub->regen_count = 0;
4694: spin_unlock(&ifpub->lock);
4695: rcu_read_unlock_bh();
4696: ipv6_create_tempaddr(ifpub, true);
4697: in6_ifa_put(ifpub);
4698: in6_ifa_put(ifp);
4699: rcu_read_lock_bh();
4700: goto restart;
4701: } else if (time_before(ifp->tstamp + ifp->prefered_lft * HZ - regen_advance * HZ, next))
4702: next = ifp->tstamp + ifp->prefered_lft * HZ - regen_advance * HZ;
4703: }
4704:
4705: if (ifp->valid_lft != INFINITY_LIFE_TIME &&
4706: age >= ifp->valid_lft) {
4707: spin_unlock(&ifp->lock);
4708: in6_ifa_hold(ifp);
4709: rcu_read_unlock_bh();
4710: ipv6_del_addr(ifp);
4711: rcu_read_lock_bh();
4712: goto restart;
4713: } else if (ifp->prefered_lft == INFINITY_LIFE_TIME) {
4714: spin_unlock(&ifp->lock);
4715: continue;
4716: } else if (age >= ifp->prefered_lft) {
4717: /* jiffies - ifp->tstamp > age >= ifp->prefered_lft */
4718: int deprecate = 0;
4719:
4720: if (!(ifp->flags&IFA_F_DEPRECATED)) {
4721: deprecate = 1;
4722: ifp->flags |= IFA_F_DEPRECATED;
4723: }
4724:
4725: if ((ifp->valid_lft != INFINITY_LIFE_TIME) &&
4726: (time_before(ifp->tstamp + ifp->valid_lft * HZ, next)))
4727: next = ifp->tstamp + ifp->valid_lft * HZ;
4728:
4729: spin_unlock(&ifp->lock);
4730:
4731: if (deprecate) {
4732: in6_ifa_hold(ifp);
4733:
4734: ipv6_ifa_notify(0, ifp);
4735: in6_ifa_put(ifp);
4736: goto restart;
4737: }
4738: } else {
4739: /* ifp->prefered_lft <= ifp->valid_lft */
4740: if (time_before(ifp->tstamp + ifp->prefered_lft * HZ, next))
4741: next = ifp->tstamp + ifp->prefered_lft * HZ;
4742: spin_unlock(&ifp->lock);
4743: }
4744: }
4745: }
4746:
4747: next_sec = round_jiffies_up(next);
4748: next_sched = next;
4749:
4750: /* If rounded timeout is accurate enough, accept it. */
4751: if (time_before(next_sec, next + ADDRCONF_TIMER_FUZZ))
4752: next_sched = next_sec;
4753:
4754: /* And minimum interval is ADDRCONF_TIMER_FUZZ_MAX. */
4755: if (time_before(next_sched, jiffies + ADDRCONF_TIMER_FUZZ_MAX))
4756: next_sched = jiffies + ADDRCONF_TIMER_FUZZ_MAX;
4757:
4758: pr_debug("now = %lu, schedule = %lu, rounded schedule = %lu => %lu\n",
4759: now, next, next_sec, next_sched);
4760: mod_delayed_work(addrconf_wq, &net->ipv6.addr_chk_work, next_sched - now);
4761: rcu_read_unlock_bh();
4762: }
SourceFile:net/ipv6/addrconf.c]
|
| 111/2 |
2026/09/21 01:09 |
llm |
expert-compressor |
0m
Model:
Reply: ### Workspace and Investigation Summary
#### 1. Bug Report & Overview
- **Kernel Log Message**:
`IPv6: BUG: Address 2001::fb on device lo is missing its host route.` (repeated dozens of times).
- **Exact Code Location**:
`net/ipv6/addrconf.c:6320` in `__ipv6_ifa_notify()`:
```c
static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
{
...
switch (event) {
case RTM_NEWADDR:
if (ifp->rt && !rcu_access_pointer(ifp->rt->fib6_node)) {
ip6_ins_rt(net, ifp->rt);
} else if (!ifp->rt && (ifp->idev->dev->flags & IFF_UP)) {
pr_warn("BUG: Address %pI6c on device %s is missing its host route.\n",
&ifp->addr, ifp->idev->dev->name);
}
```
- **Nature of the Bug**:
- The string contains `"BUG:"`, but it is issued via `pr_warn()`, not `BUG()` or `BUG_ON()`.
- It does NOT halt execution, panic the kernel, cause an oops, crash, deadlock, or hang.
- No memory safety violation occurred (no memory corruption, use-after-free, out-of-bounds, uninitialized memory usage, or memory leak).
- No pointer dereference of `NULL` occurs: `ifp->rt` is explicitly guarded by `if (ifp->rt ...)` and `else if (!ifp->rt ...)`. In the `!ifp->rt` branch, it prints the warning and continues normal flow.
#### 2. Detailed Reproducer Breakdown
Syzkaller reproducer performs the following syscalls:
1. `mmap` setup.
2. `socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE)`.
3. `sendmsg(sock_nl_route, ...)`: initial netlink handshake/probe.
4. `mkdirat(AT_FDCWD, "./proc", 0777)` and `mount(NULL, "./proc", "proc", 0, NULL)`.
5. `openat(AT_FDCWD, "./proc/sys/net/ipv6/conf/all/keep_addr_on_down", O_WRONLY)` and `write(fd, "1\n", 2)`: sets `keep_addr_on_down = 1`.
6. `socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE)`.
7. `ioctl(fd, SIOCGIFINDEX, "lo")`: gets `ifindex` of `lo`.
8. `sendmsg(sock_nl_route, ...)`: sends `RTM_NEWADDR` netlink message configuring IPv6 address `2001::fb/64` on `lo` with `ifaddrmsg.ifa_flags = 0`.
9. `socket(AF_INET6, SOCK_DGRAM, 0)`.
10. `ioctl(sock_in6, SIOCSIFFLAGS, "lo", IFF_UP)`: sets `lo` up (`ifru_flags = 1`).
11. `ioctl(sock_in6, SIOCSIFFLAGS, "lo", 0)`: brings `lo` down (`ifru_flags = 0`).
#### 3. Root Cause Analysis
- **Address Addition**:
- Netlink message triggers `inet6_rtm_newaddr` -> `inet6_addr_add` -> `ipv6_add_addr`.
- Address `2001::fb` gets `IFA_F_TENTATIVE | IFA_F_PERMANENT`.
- Allocates host route: `f6i = addrconf_f6i_alloc(...)`, sets `ifa->rt = f6i`.
- Because neither `IFA_F_OPTIMISTIC` nor `IFA_F_NODAD` was specified in `cfg.ifa_flags`, `ipv6_ifa_notify(0, ifp)` is called, and `addrconf_dad_start(ifp)` is initiated, scheduling `ifp->dad_work`.
- **Interface Down with `keep_addr_on_down = 1`**:
- `addrconf_ifdown()` executes:
- Because `keep_addr_on_down == 1` and the address is permanent and non-local (`2001::fb`), `keep = true`.
- `ifa->state = INET6_IFADDR_STATE_PREDAD;`
- `rt = ifa->rt;`
- `ifa->rt = NULL;`
- `ip6_del_rt(net, rt, false);`
- Calls `addrconf_del_dad_work(ifa)`:
```c
static void addrconf_del_dad_work(struct inet6_ifaddr *ifp)
{
if (cancel_delayed_work(&ifp->dad_work))
__in6_ifa_put(ifp);
}
```
- Crucially: `cancel_delayed_work()` only cancels a pending timer; if `dad_work` has already begun running or is queued on the workqueue, `cancel_delayed_work` returns false and does not synchronize/wait (`cancel_delayed_work_sync` is not used).
- **Interface Up and Down Sequences / DAD Completion**:
- When `lo` comes UP or if DAD completes while `lo` is UP (or brought back up):
- In `addrconf_dad_work`: calls `addrconf_dad_begin()`, which sees loopback (`IFF_LOOPBACK`) and calls `addrconf_dad_completed()`.
- `addrconf_dad_completed()` calls `ipv6_ifa_notify(RTM_NEWADDR, ifp)`.
- In `__ipv6_ifa_notify(RTM_NEWADDR, ifp)`:
- If `ifp->rt == NULL` (because `addrconf_ifdown` cleared it) but the interface is currently marked `IFF_UP`, the check `else if (!ifp->rt && (ifp->idev->dev->flags & IFF_UP))` evaluates to true, triggering `pr_warn("BUG: Address %pI6c on device %s is missing its host route.\n", ...)`.
#### 4. Approaches Tried and Results
1. **Git history inspection**:
- Evaluated commits for `"BUG: Address %pI6c on device"`, finding that the message has existed across long history. The repository clone boundary is at `b126f6f5940f` (7.3-rc1 merge), meaning deep commit history is not directly searchable via `git-log` beyond the boundary.
2. **References to `inet6_ifaddr::rt`**:
- Located all reads/writes in `net/ipv6/addrconf.c`.
- Verified where `ifp->rt` is read (`__ipv6_ifa_notify`, `addrconf_dad_begin`, `fixup_permanent_addr`, `addrconf_disable_policy_idev`).
- Verified that whenever `ifp->rt` is NULL in `__ipv6_ifa_notify()`, no NULL pointer dereference occurs: execution just logs `pr_warn` and breaks or proceeds to join anycast/prefix routes.
- Checked `addrconf_dad_begin`: `IFA_F_OPTIMISTIC` is not set in this reproducer, so `ip6_ins_rt(net, ifp->rt)` is not called without route.
3. **Reproducer netlink buffer dissection**:
- Decoded `sendmsg` buffer: contains `struct ifaddrmsg` followed by `RTA_ADDRESS` attribute `2001::fb`. `ifa_flags` is 0.
#### 5. Security Dimensions Assessment
1. **Exploitable**: **NO**
- No memory corruption, use-after-free, out-of-bounds access, type confusion, or uninitialized memory leak.
- The warning is harmless kernel output (`pr_warn`) documenting a missing route.
- When `ifp->rt == NULL`, the code safely skips route insertion.
2. **Denial of Service**: **NO**
- The report is a `pr_warn()`, not `BUG()`, `panic()`, or kernel halt.
- The kernel continues normal operation without deadlocking, hanging, or memory exhaustion.
- In production builds, warnings are non-fatal.
3. **Accessible From Unprivileged Processes**: **NO**
- Writing to `/proc/sys/net/ipv6/conf/*/keep_addr_on_down` requires write permission / `CAP_NET_ADMIN`.
- Modifying network interface flags via `ioctl(SIOCSIFFLAGS)` requires `CAP_NET_ADMIN` in the network namespace (`dev_change_flags` checks `ns_capable(net->user_ns, CAP_NET_ADMIN)`).
- Adding an IPv6 address via `RTM_NEWADDR` netlink requires `rtnl_netlink_allowed(net, RTM_NEWADDR)` which checks `CAP_NET_ADMIN`.
- Cannot be triggered by an unprivileged process without capabilities and without user namespaces.
4. **Accessible From User Namespaces**: **YES**
- An unprivileged user with access to `CLONE_NEWUSER | CLONE_NEWNET` has `CAP_NET_ADMIN` in their own user namespace.
- Inside an unshared user/network namespace:
- The process can mount its own `/proc` or write to sysctls in its netns.
- Can add IPv6 addresses via `RTM_NEWADDR`.
- Can set interface flags via `SIOCSIFFLAGS` on its own loopback interface `lo`.
- Thus, reachable inside a user namespace.
5. **VM Guest Trigger**: **NO**
- Pure network stack logic triggered by userspace administrative operations; not a host hypervisor bug reachable from guest.
6. **VM Host Trigger in The CC Context**: **NO**
- Not an issue with host paravirtual device or host hypercall input to confidential guest.
7. **Ethernet / Remote / Peripheral / Filesystem Triggers**: **NO**
- Not triggered by incoming wire packets, USB/peripherals, or mounting filesystems.
#### 6. Next Steps
- Execute `set-results` with the assessed values:
- `exploitable: false`
- `denial_of_service: false`
- `accessible_from_unprivileged_processes: false`
- `accessible_from_user_namespaces: true`
- `vm_guest_trigger: false`
- `vm_host_trigger_in_the_cc_context: false`
- `ethernet_network_trigger: false`
- `other_remote_trigger: false`
- `peripheral_trigger: false`
- `malicious_filesystem_trigger: false`
- Provide detailed rationale in the final response.
Tokens:
input: 47967
output: 2568
thoughts: 0
|
| 112/2 |
2026/09/21 01:09 |
llm |
expert |
0m
Model:
Tokens:
input: 28329
output: 39
thoughts: 0
|
| 113/2 |
2026/09/21 01:09 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:ipv6_ifa_notify]
Results: map[SourceCode:6354: static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
6355: {
6356: if (likely(ifp->idev->dead == 0))
6357: __ipv6_ifa_notify(event, ifp);
6358: }
SourceFile:net/ipv6/addrconf.c]
|
| 114/2 |
2026/09/21 01:09 |
llm |
expert |
0m
Model:
Tokens:
input: 28486
output: 40
thoughts: 0
|
| 115/2 |
2026/09/21 01:10 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:__ipv6_ifa_notify]
Results: map[SourceCode:6298: static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
6299: {
6300: struct net *net = dev_net(ifp->idev->dev);
6301:
6302: if (event)
6303: ASSERT_RTNL();
6304:
6305: inet6_ifa_notify(event ? : RTM_NEWADDR, ifp);
6306:
6307: switch (event) {
6308: case RTM_NEWADDR:
6309: /*
6310: * If the address was optimistic we inserted the route at the
6311: * start of our DAD process, so we don't need to do it again.
6312: * If the device was taken down in the middle of the DAD
6313: * cycle there is a race where we could get here without a
6314: * host route, so nothing to insert. That will be fixed when
6315: * the device is brought up.
6316: */
6317: if (ifp->rt && !rcu_access_pointer(ifp->rt->fib6_node)) {
6318: ip6_ins_rt(net, ifp->rt);
6319: } else if (!ifp->rt && (ifp->idev->dev->flags & IFF_UP)) {
6320: pr_warn("BUG: Address %pI6c on device %s is missing its host route.\n",
6321: &ifp->addr, ifp->idev->dev->name);
6322: }
6323:
6324: if (ifp->idev->cnf.forwarding)
6325: addrconf_join_anycast(ifp);
6326: if (!ipv6_addr_any(&ifp->peer_addr))
6327: addrconf_prefix_route(&ifp->peer_addr, 128,
6328: ifp->rt_priority, ifp->idev->dev,
6329: 0, 0, GFP_ATOMIC);
6330: break;
6331: case RTM_DELADDR:
6332: if (ifp->idev->cnf.forwarding)
6333: addrconf_leave_anycast(ifp);
6334: addrconf_leave_solict(ifp->idev, &ifp->addr);
6335: if (!ipv6_addr_any(&ifp->peer_addr)) {
6336: struct fib6_info *rt;
6337:
6338: rt = addrconf_get_prefix_route(&ifp->peer_addr, 128,
6339: ifp->idev->dev, 0, 0,
6340: false);
6341: if (rt)
6342: ip6_del_rt(net, rt, false);
6343: }
6344: if (ifp->rt) {
6345: ip6_del_rt(net, ifp->rt, false);
6346: ifp->rt = NULL;
6347: }
6348: rt_genid_bump_ipv6(net);
6349: break;
6350: }
6351: atomic_inc(&net->ipv6.dev_addr_genid);
6352: }
SourceFile:net/ipv6/addrconf.c]
|
| 116/2 |
2026/09/21 01:10 |
llm |
expert |
0m
Model:
Tokens:
input: 29491
output: 39
thoughts: 0
|
| 117/2 |
2026/09/21 01:10 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addrconf_dad_completed]
Results: map[SourceCode:4342: static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id,
4343: bool send_na)
4344: {
4345: struct net_device *dev = ifp->idev->dev;
4346: struct in6_addr lladdr;
4347: bool send_rs, send_mld;
4348:
4349: addrconf_del_dad_work(ifp);
4350:
4351: /*
4352: * Configure the address for reception. Now it is valid.
4353: */
4354:
4355: ipv6_ifa_notify(RTM_NEWADDR, ifp);
4356:
4357: /* If added prefix is link local and we are prepared to process
4358: router advertisements, start sending router solicitations.
4359: */
4360:
4361: read_lock_bh(&ifp->idev->lock);
4362: send_mld = ifp->scope == IFA_LINK && ipv6_lonely_lladdr(ifp);
4363: send_rs = send_mld &&
4364: ipv6_accept_ra(ifp->idev) &&
4365: READ_ONCE(ifp->idev->cnf.rtr_solicits) != 0 &&
4366: (dev->flags & IFF_LOOPBACK) == 0 &&
4367: (dev->type != ARPHRD_TUNNEL) &&
4368: !netif_is_team_port(dev);
4369: read_unlock_bh(&ifp->idev->lock);
4370:
4371: /* While dad is in progress mld report's source address is in6_addrany.
4372: * Resend with proper ll now.
4373: */
4374: if (send_mld)
4375: ipv6_mc_dad_complete(ifp->idev);
4376:
4377: /* send unsolicited NA if enabled */
4378: if (send_na &&
4379: (READ_ONCE(ifp->idev->cnf.ndisc_notify) ||
4380: READ_ONCE(dev_net(dev)->ipv6.devconf_all->ndisc_notify))) {
4381: ndisc_send_na(dev, &in6addr_linklocal_allnodes, &ifp->addr,
4382: /*router=*/ !!ifp->idev->cnf.forwarding,
4383: /*solicited=*/ false, /*override=*/ true,
4384: /*inc_opt=*/ true);
4385: }
4386:
4387: if (send_rs) {
4388: /*
4389: * If a host as already performed a random delay
4390: * [...] as part of DAD [...] there is no need
4391: * to delay again before sending the first RS
4392: */
4393: if (ipv6_get_lladdr(dev, &lladdr, IFA_F_TENTATIVE))
4394: return;
4395: ndisc_send_rs(dev, &lladdr, &in6addr_linklocal_allrouters);
4396:
4397: write_lock_bh(&ifp->idev->lock);
4398: spin_lock(&ifp->lock);
4399: ifp->idev->rs_interval = rfc3315_s14_backoff_init(
4400: READ_ONCE(ifp->idev->cnf.rtr_solicit_interval));
4401: ifp->idev->rs_probes = 1;
4402: ifp->idev->if_flags |= IF_RS_SENT;
4403: addrconf_mod_rs_timer(ifp->idev, ifp->idev->rs_interval);
4404: spin_unlock(&ifp->lock);
4405: write_unlock_bh(&ifp->idev->lock);
4406: }
4407:
4408: if (bump_id)
4409: rt_genid_bump_ipv6(dev_net(dev));
4410:
4411: /* Make sure that a new temporary address will be created
4412: * before this temporary address becomes deprecated.
4413: */
4414: if (ifp->flags & IFA_F_TEMPORARY)
4415: addrconf_verify_rtnl(dev_net(dev));
4416: }
SourceFile:net/ipv6/addrconf.c]
|
| 118/2 |
2026/09/21 01:10 |
llm |
expert |
0m
Model:
Tokens:
input: 30839
output: 39
thoughts: 0
|
| 119/2 |
2026/09/21 01:10 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addrconf_dad_begin]
Results: map[SourceCode:4127: static void addrconf_dad_begin(struct inet6_ifaddr *ifp)
4128: {
4129: struct inet6_dev *idev = ifp->idev;
4130: struct net_device *dev = idev->dev;
4131: bool bump_id, notify = false;
4132: struct net *net;
4133:
4134: addrconf_join_solict(dev, &ifp->addr);
4135:
4136: read_lock_bh(&idev->lock);
4137: spin_lock(&ifp->lock);
4138: if (ifp->state == INET6_IFADDR_STATE_DEAD)
4139: goto out;
4140:
4141: net = dev_net(dev);
4142: if (dev->flags&(IFF_NOARP|IFF_LOOPBACK) ||
4143: (READ_ONCE(net->ipv6.devconf_all->accept_dad) < 1 &&
4144: READ_ONCE(idev->cnf.accept_dad) < 1) ||
4145: !(ifp->flags&IFA_F_TENTATIVE) ||
4146: ifp->flags & IFA_F_NODAD) {
4147: bool send_na = false;
4148:
4149: if (ifp->flags & IFA_F_TENTATIVE &&
4150: !(ifp->flags & IFA_F_OPTIMISTIC))
4151: send_na = true;
4152: bump_id = ifp->flags & IFA_F_TENTATIVE;
4153: ifp->flags &= ~(IFA_F_TENTATIVE|IFA_F_OPTIMISTIC|IFA_F_DADFAILED);
4154: spin_unlock(&ifp->lock);
4155: read_unlock_bh(&idev->lock);
4156:
4157: addrconf_dad_completed(ifp, bump_id, send_na);
4158: return;
4159: }
4160:
4161: if (!(idev->if_flags & IF_READY)) {
4162: spin_unlock(&ifp->lock);
4163: read_unlock_bh(&idev->lock);
4164: /*
4165: * If the device is not ready:
4166: * - keep it tentative if it is a permanent address.
4167: * - otherwise, kill it.
4168: */
4169: in6_ifa_hold(ifp);
4170: addrconf_dad_stop(ifp, 0);
4171: return;
4172: }
4173:
4174: /*
4175: * Optimistic nodes can start receiving
4176: * Frames right away
4177: */
4178: if (ifp->flags & IFA_F_OPTIMISTIC) {
4179: ip6_ins_rt(net, ifp->rt);
4180: if (ipv6_use_optimistic_addr(net, idev)) {
4181: /* Because optimistic nodes can use this address,
4182: * notify listeners. If DAD fails, RTM_DELADDR is sent.
4183: */
4184: notify = true;
4185: }
4186: }
4187:
4188: addrconf_dad_kick(ifp);
4189: out:
4190: spin_unlock(&ifp->lock);
4191: read_unlock_bh(&idev->lock);
4192: if (notify)
4193: ipv6_ifa_notify(RTM_NEWADDR, ifp);
4194: }
SourceFile:net/ipv6/addrconf.c]
|
| 120/2 |
2026/09/21 01:10 |
llm |
expert |
0m
Model:
Tokens:
input: 31963
output: 41
thoughts: 0
|
| 121/2 |
2026/09/21 01:10 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addrconf_del_dad_work]
Results: map[SourceCode: 323: static void addrconf_del_dad_work(struct inet6_ifaddr *ifp)
324: {
325: if (cancel_delayed_work(&ifp->dad_work))
326: __in6_ifa_put(ifp);
327: }
SourceFile:net/ipv6/addrconf.c]
|
| 122/2 |
2026/09/21 01:10 |
llm |
expert |
0m
Model:
Tokens:
input: 32120
output: 41
thoughts: 0
|
| 123/2 |
2026/09/21 01:10 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/ipv6/addrconf.c Name:addrconf_mod_dad_work]
Results: map[SourceCode: 336: static void addrconf_mod_dad_work(struct inet6_ifaddr *ifp,
337: unsigned long delay)
338: {
339: in6_ifa_hold(ifp);
340: if (mod_delayed_work(addrconf_wq, &ifp->dad_work, delay))
341: in6_ifa_put(ifp);
342: }
SourceFile:net/ipv6/addrconf.c]
|
| 124/2 |
2026/09/21 01:10 |
llm |
expert |
0m
Model:
Tokens:
input: 32313
output: 66
thoughts: 0
|
| 125/2 |
2026/09/21 01:10 |
tool |
set-results |
0m
Args: map[DenialOfService:false Exploitable:false FilesystemTrigger:false NetworkTrigger:false PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:true VMGuestTrigger:false VMHostTrigger:false]
Results: map[DenialOfService:false Exploitable:false FilesystemTrigger:false NetworkTrigger:false PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:true VMGuestTrigger:false VMHostTrigger:false]
|
| 126/2 |
2026/09/21 01:10 |
llm |
expert |
0m
Model:
Tokens:
input: 32443
output: 831
thoughts: 640
Thoughts: **My Assessment of the IPv6 Address Missing Host Route Warning**
Okay, so here's what I've got. This bug is just a `pr_warn` in `__ipv6_ifa_notify` that flags an IPv6 address missing its host route, even though the interface is up. I see how the reproducer works; it's a bit of a race condition. It boils down to:
1. Setting `keep_addr_on_down` to 1.
2. Adding an IPv6 address to the loopback interface (`lo`).
3. Bringing `lo` up, then down.
When `lo` goes down, the system keeps the address because of `keep_addr_on_down`, but it deletes the route associated with it. The `addrconf_ifdown` process then sets the `ifa->rt` to `NULL` and the route is deleted. Critically, it then cancels a delayed work queue item related to Duplicate Address Detection (DAD). However, that cancel function doesn't wait for any running DAD work to finish.
The problem arises if the DAD work is running concurrently. If that work completes and calls `ipv6_ifa_notify`, it sees `IFF_UP` after the route has been removed, triggering the warning. In essence, it's a window of vulnerability during the interface's state transition. I had to double-check the reproducer steps because the sequence of interface up and down seemed counterintuitive, but I'm clear on it now.
The good news is, it's just a warning. This isn't causing a kernel crash, it isn't leading to memory corruption, and it's not a denial-of-service issue (just a print to the kernel log). It also requires the `CAP_NET_ADMIN` capability. My immediate concern was how easily exploitable this is.
After some deeper checking of the capabilities, this is not accessible from unprivileged processes without user namespaces, and `CAP_NET_ADMIN` *is* sufficient in a user namespace. So, it's not exploitable by a standard user; you'd need the necessary permissions. In short, it's benign. Time to file a clear and concise report, stating that it is a warning only, requires elevated privileges, and isn't exploitable.
|
| 127/1 |
2026/09/21 01:11 |
action |
format-explanation |
0m
Results: map[Explanation:**Bug Analysis:**
The bug report highlights a warning message: `IPv6: BUG: Address 2001::fb on
device lo is missing its host route.` This message is generated by a `pr_warn()`
call in `__ipv6_ifa_notify()` located in `net/ipv6/addrconf.c`.
**Root Cause:**
The issue is a race condition involving IPv6 Duplicate Address Detection (DAD)
and interface state changes when the `keep_addr_on_down` sysctl is enabled.
1. The reproducer sets `/proc/sys/net/ipv6/conf/all/keep_addr_on_down` to `1`.
2. It adds a permanent IPv6 address (`2001::fb`) to the loopback interface
(`lo`) via a netlink `RTM_NEWADDR` message. This schedules DAD work
(`addrconf_dad_work`).
3. It then toggles the `lo` interface state (UP then DOWN).
4. When the interface is brought DOWN, `addrconf_ifdown()` is invoked. Because
`keep_addr_on_down` is enabled, the IPv6 address is kept, but its host route is
removed (`ifa->rt = NULL`), and `addrconf_del_dad_work()` is called to cancel
the pending DAD work.
5. However, `addrconf_del_dad_work()` uses `cancel_delayed_work()`, which does
not synchronously wait for the work to finish if it is already executing.
6. If the DAD work is already running concurrently and completes, it calls
`addrconf_dad_completed()`, which in turn calls `ipv6_ifa_notify(RTM_NEWADDR,
ifp)`.
7. Inside `__ipv6_ifa_notify()`, the code checks if the interface is UP and if
the route is missing. If the interface was quickly brought back UP (or due to
the race), the condition `!ifp->rt && (ifp->idev->dev->flags & IFF_UP)`
evaluates to true, triggering the `pr_warn()`.
**Security Dimensions:**
* **Exploitable: NO**
The bug is purely a logical race condition that results in a harmless
`pr_warn()` message. There is no memory corruption, use-after-free,
out-of-bounds access, uninitialized memory usage, or information leak. The
kernel safely handles the missing route by skipping the route insertion and
continuing execution normally.
* **Denial of Service: NO**
The warning does not halt the kernel, cause a panic, deadlock, or hang. It
is a non-fatal warning (`pr_warn`, not `BUG()` or `panic()`) that merely
logs the unexpected state. The system continues to operate normally.
* **Accessible From Unprivileged Processes: NO**
Triggering this bug requires modifying network interface flags
(`SIOCSIFFLAGS`), adding an IPv6 address (`RTM_NEWADDR`), and writing to the
`keep_addr_on_down` sysctl. All of these operations require `CAP_NET_ADMIN`
privileges.
* **Accessible From User Namespaces: YES**
An unprivileged user can create a new user and network namespace
(`CLONE_NEWUSER | CLONE_NEWNET`), gaining `CAP_NET_ADMIN` within that
namespace. Inside the namespace, they can mount their own `/proc`, modify
the `keep_addr_on_down` sysctl, configure the `lo` interface, and trigger
the race condition.
* **VM Guest / VM Host / Network / Remote / Peripheral / Filesystem Triggers:
NO**
The issue is strictly related to local network administration tasks
(interface state toggling and address configuration) and cannot be triggered
by external network traffic, guest/host interactions, peripherals, or
malicious filesystems.]
|