# CVE-2024-26732: net: implement lockless setsockopt(SO\_PEEK\_OFF)

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.20% (percentile 6, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2024-04-03T17:00:19.722Z
- **Modified:** 2026-06-17T07:18:12.100Z

## Who should check

- Anyone running Linux \>= 859051dd165ec6cc915f0f2114699021144fd249, \< 897f75e2cde8a5f9f7529b55249af1fa4248c83b; \>= 859051dd165ec6cc915f0f2114699021144fd249, \< 56667da7399eb19af857e30f41bea89aa6fa812c
- Anyone running Linux 6.7

## Description

In the Linux kernel, the following vulnerability has been resolved:

net: implement lockless setsockopt(SO\_PEEK\_OFF)

syzbot reported a lockdep violation \[1\] involving af\_unix
support of SO\_PEEK\_OFF.

Since SO\_PEEK\_OFF is inherently not thread safe (it uses a per-socket
sk\_peek\_off field), there is really no point to enforce a pointless
thread safety in the kernel.

After this patch :

- setsockopt(SO\_PEEK\_OFF) no longer acquires the socket lock.

- skb\_consume\_udp() no longer has to acquire the socket lock.

- af\_unix no longer needs a special version of sk\_set\_peek\_off(),
  because it does not lock u-\>iolock anymore.

As a followup, we could replace prot-\>set\_peek\_off to be a boolean
and avoid an indirect call, since we always use sk\_set\_peek\_off().

\[1\]

WARNING: possible circular locking dependency detected
6.8.0-rc4-syzkaller-00267-g0f1dd5e91e2b \#0 Not tainted

syz-executor.2/30025 is trying to acquire lock:
 ffff8880765e7d80 (&u-\>iolock){+.+.}-{3:3}, at: unix\_set\_peek\_off+0x26/0xa0 net/unix/af\_unix.c:789

but task is already holding lock:
 ffff8880765e7930 (sk\_lock-AF\_UNIX){+.+.}-{0:0}, at: lock\_sock include/net/sock.h:1691 \[inline\]
 ffff8880765e7930 (sk\_lock-AF\_UNIX){+.+.}-{0:0}, at: sockopt\_lock\_sock net/core/sock.c:1060 \[inline\]
 ffff8880765e7930 (sk\_lock-AF\_UNIX){+.+.}-{0:0}, at: sk\_setsockopt+0xe52/0x3360 net/core/sock.c:1193

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-\> \#1 (sk\_lock-AF\_UNIX){+.+.}-{0:0}:
        lock\_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754
        lock\_sock\_nested+0x48/0x100 net/core/sock.c:3524
        lock\_sock include/net/sock.h:1691 \[inline\]
        \_\_unix\_dgram\_recvmsg+0x1275/0x12c0 net/unix/af\_unix.c:2415
        sock\_recvmsg\_nosec+0x18e/0x1d0 net/socket.c:1046
        \_\_\_\_sys\_recvmsg+0x3c0/0x470 net/socket.c:2801
        \_\_\_sys\_recvmsg net/socket.c:2845 \[inline\]
        do\_recvmmsg+0x474/0xae0 net/socket.c:2939
        \_\_sys\_recvmmsg net/socket.c:3018 \[inline\]
        \_\_do\_sys\_recvmmsg net/socket.c:3041 \[inline\]
        \_\_se\_sys\_recvmmsg net/socket.c:3034 \[inline\]
        \_\_x64\_sys\_recvmmsg+0x199/0x250 net/socket.c:3034
       do\_syscall\_64+0xf9/0x240
       entry\_SYSCALL\_64\_after\_hwframe+0x6f/0x77

-\> \#0 (&u-\>iolock){+.+.}-{3:3}:
        check\_prev\_add kernel/locking/lockdep.c:3134 \[inline\]
        check\_prevs\_add kernel/locking/lockdep.c:3253 \[inline\]
        validate\_chain+0x18ca/0x58e0 kernel/locking/lockdep.c:3869
        \_\_lock\_acquire+0x1345/0x1fd0 kernel/locking/lockdep.c:5137
        lock\_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754
        \_\_mutex\_lock\_common kernel/locking/mutex.c:608 \[inline\]
        \_\_mutex\_lock+0x136/0xd70 kernel/locking/mutex.c:752
        unix\_set\_peek\_off+0x26/0xa0 net/unix/af\_unix.c:789
       sk\_setsockopt+0x207e/0x3360
        do\_sock\_setsockopt+0x2fb/0x720 net/socket.c:2307
        \_\_sys\_setsockopt+0x1ad/0x250 net/socket.c:2334
        \_\_do\_sys\_setsockopt net/socket.c:2343 \[inline\]
        \_\_se\_sys\_setsockopt net/socket.c:2340 \[inline\]
        \_\_x64\_sys\_setsockopt+0xb5/0xd0 net/socket.c:2340
       do\_syscall\_64+0xf9/0x240
       entry\_SYSCALL\_64\_after\_hwframe+0x6f/0x77

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(sk\_lock-AF\_UNIX);
                               lock(&u-\>iolock);
                               lock(sk\_lock-AF\_UNIX);
  lock(&u-\>iolock);

 \*\*\* DEADLOCK \*\*\*

1 lock held by syz-executor.2/30025:
  \#0: ffff8880765e7930 (sk\_lock-AF\_UNIX){+.+.}-{0:0}, at: lock\_sock include/net/sock.h:1691 \[inline\]
  \#0: ffff8880765e7930 (sk\_lock-AF\_UNIX){+.+.}-{0:0}, at: sockopt\_lock\_sock net/core/sock.c:1060 \[inline\]
  \#0: ffff8880765e7930 (sk\_lock-AF\_UNIX){+.+.}-{0:0}, at: sk\_setsockopt+0xe52/0x3360 net/core/sock.c:1193

stack backtrace:
CPU: 0 PID: 30025 Comm: syz-executor.2 Not tainted 6.8.0-rc4-syzkaller-00267-g0f1dd5e91e2b \#0
Hardware name: Google Google C
---truncated---

## Affected and fixed versions

- Linux: \>= 859051dd165ec6cc915f0f2114699021144fd249, \< 897f75e2cde8a5f9f7529b55249af1fa4248c83b; \>= 859051dd165ec6cc915f0f2114699021144fd249, \< 56667da7399eb19af857e30f41bea89aa6fa812c (cvelist)
- Linux: 6.7 (cvelist)

## Mitigation

- Upgrade Linux to 56667da7399eb19af857e30f41bea89aa6fa812c or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-26732. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-26732.md
Affected: Linux >= 859051dd165ec6cc915f0f2114699021144fd249, < 897f75e2cde8a5f9f7529b55249af1fa4248c83b; >= 859051dd165ec6cc915f0f2114699021144fd249, < 56667da7399eb19af857e30f41bea89aa6fa812c; Linux 6.7
Fixed in: Linux 897f75e2cde8a5f9f7529b55249af1fa4248c83b, Linux 56667da7399eb19af857e30f41bea89aa6fa812c

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-26732 being exploited?

There is no confirmed exploitation: CVE-2024-26732 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.20% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-26732?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-26732?

Linux \>= 859051dd165ec6cc915f0f2114699021144fd249, \< 897f75e2cde8a5f9f7529b55249af1fa4248c83b; \>= 859051dd165ec6cc915f0f2114699021144fd249, \< 56667da7399eb19af857e30f41bea89aa6fa812c; Linux 6.7.

### Is there a fix for CVE-2024-26732?

Yes. Fixed in Linux 897f75e2cde8a5f9f7529b55249af1fa4248c83b, Linux 56667da7399eb19af857e30f41bea89aa6fa812c. Upgrade Linux to 56667da7399eb19af857e30f41bea89aa6fa812c or later.

### How do I check if I'm affected by CVE-2024-26732?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/897f75e2cde8a5f9f7529b55249af1fa4248c83b>
- patch: <https://git.kernel.org/stable/c/56667da7399eb19af857e30f41bea89aa6fa812c>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-26732>

HTML: <https://flawdb.com/CVE-2024-26732> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-26732>
