[PW_SID:1126651] Bluetooth: btbcm: bound local name logging#431
[PW_SID:1126651] Bluetooth: btbcm: bound local name logging#431BluezTestBot wants to merge 1 commit into
Conversation
The HCI Read Local Name response contains a fixed 248-byte name. A NUL terminator is supplied only when the name is shorter than the maximum length. btbcm prints the returned name using %s, so a maximum-length controller name lets the log formatting read past the HCI response buffer. Use a precision of HCI_MAX_NAME_LENGTH when logging the name. Fixes: 9bc63ca ("Bluetooth: btbcm: Read the local name in setup stage") Fixes: 2fcdd56 ("Bluetooth: btbcm: Make btbcm_initialize() print local-name on re-init too") Cc: stable@vger.kernel.org Signed-off-by: Laxman Acharya Padhya <acharyalaxman8848@gmail.com>
|
CheckPatch |
|
VerifyFixes |
|
VerifySignedoff |
|
GitLint |
|
SubjectPrefix |
|
BuildKernel |
|
CheckAllWarning |
|
CheckSparse |
|
BuildKernel32 |
|
CheckKernelLLVM |
|
TestRunnerSetup |
|
IncrementalBuild |
The HCI Read Local Name response contains a fixed 248-byte name. A NUL
terminator is supplied only when the name is shorter than the maximum
length.
btbcm prints the returned name using %s, so a maximum-length controller
name lets the log formatting read past the HCI response buffer.
Use a precision of HCI_MAX_NAME_LENGTH when logging the name.
Fixes: 9bc63ca ("Bluetooth: btbcm: Read the local name in setup stage")
Fixes: 2fcdd56 ("Bluetooth: btbcm: Make btbcm_initialize() print local-name on re-init too")
Cc: stable@vger.kernel.org
Signed-off-by: Laxman Acharya Padhya acharyalaxman8848@gmail.com
drivers/bluetooth/btbcm.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)