# CVE-2021-47297: net: fix uninit-value in caif_seqpkt_sendmsg

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.23%, higher than 14% of CVEs (2026-12-01)
- Published: 2024-05-21T14:35:19.982Z
- Modified: 2026-06-17T04:17:07.950Z
- Weaknesses: CWE-908
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

net: fix uninit-value in caif_seqpkt_sendmsg

When nr_segs equal to zero in iovec_from_user, the object
msg->msg_iter.iov is uninit stack memory in caif_seqpkt_sendmsg
which is defined in ___sys_sendmsg. So we cann't just judge
msg->msg_iter.iov->base directlly. We can use nr_segs to judge
msg in caif_seqpkt_sendmsg whether has data buffers.

=====================================================
BUG: KMSAN: uninit-value in caif_seqpkt_sendmsg+0x693/0xf60 net/caif/caif_socket.c:542
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1c9/0x220 lib/dump_stack.c:118
 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118
 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215
 caif_seqpkt_sendmsg+0x693/0xf60 net/caif/caif_socket.c:542
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 ____sys_sendmsg+0x12b6/0x1350 net/socket.c:2343
 ___sys_sendmsg net/socket.c:2397 [inline]
 __sys_sendmmsg+0x808/0xc90 net/socket.c:2480
 __compat_sys_sendmmsg net/compat.c:656 [inline]

(As written by CVE List.)

## Affected

- Linux Linux: from bece7b2398d073d11b2e352405a3ecd3a1e39c60 before d9d646acad2c3590e189bb5d5c86ab8bd8a2dfc3; from bece7b2398d073d11b2e352405a3ecd3a1e39c60 before 5c6d8e2f7187b8e45a18c27acb7a3885f03ee3db; from bece7b2398d073d11b2e352405a3ecd3a1e39c60 before ffe31dd70b70a40cd6b21b78c1713a23e021843a; from bece7b2398d073d11b2e352405a3ecd3a1e39c60 before 452c3ed7bf63721b07bc2238ed1261bb26027e85; from bece7b2398d073d11b2e352405a3ecd3a1e39c60 before 9413c0abb57f70a953b1116318d6aa478013c35d; from bece7b2398d073d11b2e352405a3ecd3a1e39c60 before 1582a02fecffcee306663035a295e28e1c4aaaff; from bece7b2398d073d11b2e352405a3ecd3a1e39c60 before d4c7797ab1517515f0d08b3bc1c6b48883889c54; from bece7b2398d073d11b2e352405a3ecd3a1e39c60 before 991e634360f2622a683b48dfe44fe6d9cb765a09; 2.6.35 (not affected: before 2.6.35; from 4.4.277 up to 4.4.*; from 4.9.277 up to 4.9.*; from 4.14.241 up to 4.14.*; from 4.19.199 up to 4.19.*; from 5.4.136 up to 5.4.*; from 5.10.54 up to 5.10.*; from 5.13.6 up to 5.13.*; from 5.14 up to *)
- linux linux_kernel: from 2.6.35 before 4.4.277; from 4.5 before 4.9.277; from 4.10 before 4.14.241; from 4.15 before 4.19.199; from 4.20 before 5.4.136; from 5.5 before 5.10.54; from 5.11 before 5.13.6; 5.14

## References

- <https://git.kernel.org/stable/c/d9d646acad2c3590e189bb5d5c86ab8bd8a2dfc3> (patch)
- <https://git.kernel.org/stable/c/5c6d8e2f7187b8e45a18c27acb7a3885f03ee3db> (patch)
- <https://git.kernel.org/stable/c/ffe31dd70b70a40cd6b21b78c1713a23e021843a> (patch)
- <https://git.kernel.org/stable/c/452c3ed7bf63721b07bc2238ed1261bb26027e85> (patch)
- <https://git.kernel.org/stable/c/9413c0abb57f70a953b1116318d6aa478013c35d> (patch)
- <https://git.kernel.org/stable/c/1582a02fecffcee306663035a295e28e1c4aaaff> (patch)
- <https://git.kernel.org/stable/c/d4c7797ab1517515f0d08b3bc1c6b48883889c54> (patch)
- <https://git.kernel.org/stable/c/991e634360f2622a683b48dfe44fe6d9cb765a09> (patch)

## Sources

- CVE List: [CVE-2021-47297](https://www.cve.org/CVERecord?id=CVE-2021-47297), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2021-47297](https://nvd.nist.gov/vuln/detail/CVE-2021-47297), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-47297 · Whole record: https://cve.day/CVE-2021-47297.json · Rebuilt by cve.day 2026-11-25T22:58:08.782Z
