[Bug] "general protection fault in txopt_get" in Linux kernel v6.12
From: John <hidden>
Date: 2025-05-22 14:49:37
Also in:
lkml
Dear Linux Kernel Maintainers, I hope this message finds you well. I am writing to report a potential vulnerability I encountered during testing of the Linux Kernel version v6.12. Git Commit: adc218676eef25575469234709c2d87185ca223a (tag: v6.12) Bug Location: 0010:txopt_get+0xbc/0x440 include/net/ipv6.h:390 Bug report: https://hastebin.com/share/ruwexefulo.yaml Complete log: https://hastebin.com/share/inequmeyef.perl Entire kernel config: https://hastebin.com/share/agatonohuy.ini Root Cause Analysis: A malformed netlink message with invalid CALIPSO attributes triggered a general protection fault via a NULL pointer dereference in the txopt_get() function (include/net/ipv6.h:390). The fault occurs because the socket passed into calipso_sock_setattr() is not guaranteed to be a valid IPv6 socket with properly initialized transmit options. The bug demonstrates missing validation of socket type and per-socket IPv6 metadata in the NetLabel CALIPSO code path. Fixing this requires enforcing socket type checks and guarding against null dereference in txopt_get() and its callers. At present, I have not yet obtained a minimal reproducer for this issue. However, I am actively working on reproducing it, and I will promptly share any additional findings or a working reproducer as soon as it becomes available. Thank you very much for your time and attention to this matter. I truly appreciate the efforts of the Linux kernel community. Best regards, John