CVE-2021-47252: batman-adv: Avoid WARN_ON timing related checks
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
batman-adv: Avoid WARN_ON timing related checks
The soft/batadv interface for a queued OGM can be changed during the time the OGM was queued for transmission and when the OGM is actually transmitted by the worker.
But WARN_ON must be used to denote kernel bugs and not to print simple warnings. A warning can simply be printed using pr_warn.
The Linux kernel CVE team has assigned CVE-2021-47252 to this issue.
Affected and fixed versions
===========================
Issue introduced in 3.14 with commit ef0a937f7a14 and fixed in 4.4.293 with commit 45011f2973f6 Issue introduced in 3.14 with commit ef0a937f7a14 and fixed in 4.9.274 with commit 6031daaaf6d5 Issue introduced in 3.14 with commit ef0a937f7a14 and fixed in 4.14.238 with commit 77a99aad5bc3 Issue introduced in 3.14 with commit ef0a937f7a14 and fixed in 4.19.196 with commit e8e9d2968a9d Issue introduced in 3.14 with commit ef0a937f7a14 and fixed in 5.4.128 with commit e7fbd8184fa9 Issue introduced in 3.14 with commit ef0a937f7a14 and fixed in 5.10.46 with commit 282baa8104af Issue introduced in 3.14 with commit ef0a937f7a14 and fixed in 5.12.13 with commit 2eb4e0b36318 Issue introduced in 3.14 with commit ef0a937f7a14 and fixed in 5.13 with commit 9f460ae31c44
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2021-47252
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
net/batman-adv/bat_iv_ogm.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/45011f2973f6b52cf50db397bb27bf805f5f0e7f https://git.kernel.org/stable/c/6031daaaf6d5c359c99dfffa102e332df234ff09 https://git.kernel.org/stable/c/77a99aad5bc3ea105806ebae6be3cbadc2fc615e https://git.kernel.org/stable/c/e8e9d2968a9d08bf5c683afca182f1537edebf8d https://git.kernel.org/stable/c/e7fbd8184fa9e85f0d648c499841cb7ff6dec9f4 https://git.kernel.org/stable/c/282baa8104af44e04c4af3e7f933b44267c7f86f https://git.kernel.org/stable/c/2eb4e0b3631832a4291c8bf4c9db873f60b128c8 https://git.kernel.org/stable/c/9f460ae31c4435fd022c443a6029352217a16ac1