An issue was discovered in can_can_gw_rcv in net/can/gw.c in the Linux kernel through 4.19.13. The CAN frame modification rules allow bitwise logical operations that can be also applied to the can_dlc field. The privileged user "root" with CAP_NET_ADMIN can create a CAN frame modification rule that makes the data length code a higher value than the available CAN frame data size. In combination with a configured checksum calculation where the result is stored relatively to the end of the data (e.g. cgw_csum_xor_rel) the tail of the skb (e.g. frag_list pointer in skb_shared_info) can be rewritten which finally can cause a system crash. Because of a missing check, the CAN drivers may write arbitrary content beyond the data registers in the CAN controller's I/O memory when processing can-gw manipulated outgoing frames.
4.4.0-1040.434.4.0-144.170~14.04.14.4.0-145.1714.4.0-1079.894.15.0-1047.49~16.04.14.15.0-1056.614.15.0-1041.434.15.0-60.67~16.04.14.4.0-1043.494.15.0-1022.25~16.04.1Exploitability
AV:LAC:LPR:HUI:NScope
S:UImpact
C:NI:NA:HCVSS:3.0/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H