[SRU Impish 0/2] CVE-2022-28356 followup

Thadeu Lima de Souza Cascardo cascardo at canonical.com
Tue Jun 21 19:09:10 UTC 2022

When binding an already bound LLC socket, network devices references would
be put, leading to a use-after-free.

[Test case]
A program binding an LLC socket multiple times was used to test this.

A pre-req commit is included as it allows dev_put to be called with a NULL parameter.
The fix is the one applied to 5.10.y tree as the upstream version of the
original fix required a new function that is not present on 5.13.

Other error paths on the affected functions were reviewed.

[Potential regression]
LLC socket users would be affected. LLC require CAP_NET_RAW on the initial network namespace.

Eric Dumazet (1):
  llc: only change llc->dev when bind() succeeds

Yajun Deng (1):
  netdevice: add the case if dev is NULL

 include/linux/netdevice.h | 12 ++++++---
 net/llc/af_llc.c          | 57 ++++++++++++++++++++++-----------------
 2 files changed, 40 insertions(+), 29 deletions(-)


More information about the kernel-team mailing list