llc: fix skb UAF and leaks on llc_mac_hdr_init() failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 41dcae82bece9f106b4dff0ee777bba8d157c8a8| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
llc: fix skb UAF and leaks on llc_mac_hdr_init() failure
In llc_conn_ac_resend_i_xxx_x_set_0_or_send_rr(), if llc_mac_hdr_init() fails, kfree_skb(skb) is called instead of kfree_skb(nskb). This leaks the newly allocated nskb, reads from the freed skb via LLC_I_GET_NR(pdu), and double-frees skb when llc_conn_state_process() drops its reference.
In llc_sap_action_send_xid_r() and llc_sap_action_send_test_r(), nskb is leaked if llc_mac_hdr_init() returns an error.
Free nskb in all three error paths.
From the CVE record · Linux
The Linux kernel’s LLC code mishandles packet buffers when llc_mac_hdr_init() fails, causing a use-after-free, a double-free, and memory leaks. The input does not specify how an attacker could trigger the failure or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels should check whether their kernel includes the LLC fix; affected versions are not specified.