[PW_SID:1053791] mgmt: Fix heap overflow and race condition#3321
[PW_SID:1053791] mgmt: Fix heap overflow and race condition#3321BluezTestBot wants to merge 2 commits intoworkflowfrom
Conversation
This patch adds workflow files for ci: [sync.yml] - The workflow file for scheduled work - Sync the repo with upstream repo and rebase the workflow branch - Review the patches in the patchwork and creates the PR if needed [ci.yml] - The workflow file for CI tasks - Run CI tests when PR is created Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
This patch addresses two issues in mesh handling: 1. Heap buffer overflow in mgmt_mesh_add: The 'len' parameter wasn't being validated against the 'param' size, potentially leading to an overflow. Added a check to validate user input. 2. Race conditions in mgmt_mesh_add and mgmt_mesh_find: These functions modify or traverse the mesh_pending list without locking. Used guard(mutex) with the existing mgmt_pending_lock to protect the critical sections, as suggested by maintainers. Fixes: b338d91 ("Bluetooth: Implement support for Mesh") Cc: stable@vger.kernel.org Signed-off-by: Maiquel Paiva <maiquelpaiva@gmail.com>
|
CheckPatch |
|
GitLint |
|
SubjectPrefix |
|
BuildKernel |
|
CheckAllWarning |
|
CheckSparse |
|
BuildKernel32 |
|
TestRunnerSetup |
|
TestRunner_l2cap-tester |
|
TestRunner_iso-tester |
|
TestRunner_bnep-tester |
|
TestRunner_mgmt-tester |
|
TestRunner_rfcomm-tester |
|
TestRunner_sco-tester |
|
TestRunner_ioctl-tester |
|
TestRunner_mesh-tester |
|
TestRunner_smp-tester |
|
TestRunner_userchan-tester |
|
IncrementalBuild |
620c8d9 to
07fb4f1
Compare
9a1e809 to
ab1b299
Compare
4532776 to
03f6700
Compare
This patch addresses two issues in mesh handling:
Heap buffer overflow in mgmt_mesh_add:
The 'len' parameter wasn't being validated against the 'param' size,
potentially leading to an overflow. Added a check to validate user
input.
Race conditions in mgmt_mesh_add and mgmt_mesh_find:
These functions modify or traverse the mesh_pending list without
locking. Used guard(mutex) with the existing mgmt_pending_lock to
protect the critical sections, as suggested by maintainers.
Fixes: b338d91 ("Bluetooth: Implement support for Mesh")
Cc: stable@vger.kernel.org
Signed-off-by: Maiquel Paiva maiquelpaiva@gmail.com
net/bluetooth/mgmt_util.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)