[PW_SID:1095975] [v3] Bluetooth: btintel: Use skb_pull_data return for bounds check#204
[PW_SID:1095975] [v3] Bluetooth: btintel: Use skb_pull_data return for bounds check#204BluezTestBot wants to merge 6 commits into
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 replaces the bzcafe action with bluez/action-ci so we can maintain everything in the github bluez organization Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This attempts to sync every 5 minutes instead of 30. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
bluez/action-ci uses master as default branch for workflow which is incorrect for kernel Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The CI action now creates individual GitHub Check Runs per test, which requires 'checks: write' permission on the GITHUB_TOKEN. Also make the pull_request trigger types explicit to include 'reopened', allowing CI to be retriggered by closing and reopening a PR.
The length check at the top of btintel_print_fseq_info() verifies the skb has at least 66 bytes (sizeof(u32) * 16 + 2), but the function actually consumes 74 bytes (2 * 1 + 18 * 4). When firmware returns a packet of exactly 66 bytes, the last two skb_pull_data() calls return NULL, which is passed directly to get_unaligned_le32(), resulting in a NULL pointer dereference. Remove the insufficient length check and instead validate every skb_pull_data() return value, branching to a malformed label that logs the error and frees the skb. Fixes: a7ba218 ("Bluetooth: btintel: Print Firmware Sequencer information") Signed-off-by: Quan Sun <2022090917019@std.uestc.edu.cn>
|
CheckPatch |
|
GitLint |
|
SubjectPrefix |
|
BuildKernel |
|
CheckAllWarning |
|
CheckSparse |
|
BuildKernel32 |
|
TestRunnerSetup |
|
IncrementalBuild |
e6b705e to
133f77d
Compare
The length check at the top of btintel_print_fseq_info() verifies
the skb has at least 66 bytes (sizeof(u32) * 16 + 2), but the
function actually consumes 74 bytes (2 * 1 + 18 * 4). When firmware
returns a packet of exactly 66 bytes, the last two skb_pull_data()
calls return NULL, which is passed directly to get_unaligned_le32(),
resulting in a NULL pointer dereference.
Remove the insufficient length check and instead validate every
skb_pull_data() return value, branching to a malformed label that
logs the error and frees the skb.
Fixes: a7ba218 ("Bluetooth: btintel: Print Firmware Sequencer information")
Signed-off-by: Quan Sun 2022090917019@std.uestc.edu.cn
drivers/bluetooth/btintel.c | 106 +++++++++++++++++++++++++++---------
1 file changed, 79 insertions(+), 27 deletions(-)