]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Bluetooth: SMP: force responder MITM requirements before building the pairing response
authorOleh Konko <security@1seal.org>
Tue, 31 Mar 2026 11:52:12 +0000 (11:52 +0000)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 1 Apr 2026 20:47:43 +0000 (16:47 -0400)
commitd05111bfe37bfd8bd4d2dfe6675d6bdeef43f7c7
treeeca194eec0c357542f28c446dd26447798b847ec
parentbda93eec78cdbfe5cda00785cefebd443e56b88b
Bluetooth: SMP: force responder MITM requirements before building the pairing response

smp_cmd_pairing_req() currently builds the pairing response from the
initiator auth_req before enforcing the local BT_SECURITY_HIGH
requirement. If the initiator omits SMP_AUTH_MITM, the response can
also omit it even though the local side still requires MITM.

tk_request() then sees an auth value without SMP_AUTH_MITM and may
select JUST_CFM, making method selection inconsistent with the pairing
policy the responder already enforces.

When the local side requires HIGH security, first verify that MITM can
be achieved from the IO capabilities and then force SMP_AUTH_MITM in the
response in both rsp.auth_req and auth. This keeps the responder auth bits
and later method selection aligned.

Fixes: 2b64d153a0cc ("Bluetooth: Add MITM mechanism to LE-SMP")
Cc: stable@vger.kernel.org
Suggested-by: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Signed-off-by: Oleh Konko <security@1seal.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/smp.c