Re: [PATCH] mpls, nospec: Sanitize array index in mpls_label_ok()

2018-02-08 Thread David Miller
From: Dan Williams Date: Wed, 07 Feb 2018 22:34:24 -0800 > mpls_label_ok() validates that the 'platform_label' array index from a > userspace netlink message payload is valid. Under speculation the > mpls_label_ok() result may not resolve in the CPU pipeline until after

[PATCH] mpls, nospec: Sanitize array index in mpls_label_ok()

2018-02-07 Thread Dan Williams
mpls_label_ok() validates that the 'platform_label' array index from a userspace netlink message payload is valid. Under speculation the mpls_label_ok() result may not resolve in the CPU pipeline until after the index is used to access an array element. Sanitize the index to zero to prevent