* [PATCH v2 net-next] net: 6lowpan: replace sprintf() with scnprintf() in debugfs
@ 2026-01-06 17:16 Kathara Sasikumar
2026-01-06 18:57 ` [v2,net-next] " bluez.test.bot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Kathara Sasikumar @ 2026-01-06 17:16 UTC (permalink / raw)
To: alex.aring, horms
Cc: davem, edumazet, kuba, pabeni, linux-bluetooth, linux-wpan,
netdev, linux-kernel, Kathara Sasikumar
sprintf() does not perform bounds checking on the destination buffer.
Replace it with scnprintf() to ensure the write stays within bounds.
No functional change intended.
Signed-off-by: Kathara Sasikumar <katharasasikumar007@gmail.com>
---
v2:
- Updated commit message wording
- Targeted the patch to net-next
---
net/6lowpan/debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/6lowpan/debugfs.c b/net/6lowpan/debugfs.c
index 600b9563bfc5..d45ace484143 100644
--- a/net/6lowpan/debugfs.c
+++ b/net/6lowpan/debugfs.c
@@ -173,7 +173,7 @@ static void lowpan_dev_debugfs_ctx_init(struct net_device *dev,
if (WARN_ON_ONCE(id >= LOWPAN_IPHC_CTX_TABLE_SIZE))
return;
- sprintf(buf, "%d", id);
+ scnprintf(buf, sizeof(buf), "%d", id);
root = debugfs_create_dir(buf, ctx);
--
2.51.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [v2,net-next] net: 6lowpan: replace sprintf() with scnprintf() in debugfs
2026-01-06 17:16 [PATCH v2 net-next] net: 6lowpan: replace sprintf() with scnprintf() in debugfs Kathara Sasikumar
@ 2026-01-06 18:57 ` bluez.test.bot
2026-01-09 2:02 ` [PATCH v2 net-next] " Jakub Kicinski
2026-01-09 17:24 ` Simon Horman
2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2026-01-06 18:57 UTC (permalink / raw)
To: linux-bluetooth, katharasasikumar007
[-- Attachment #1: Type: text/plain, Size: 3080 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1039078
---Test result---
Test Summary:
CheckPatch PENDING 0.32 seconds
GitLint PENDING 0.28 seconds
SubjectPrefix FAIL 0.49 seconds
BuildKernel PASS 25.75 seconds
CheckAllWarning PASS 28.09 seconds
CheckSparse PASS 31.65 seconds
BuildKernel32 PASS 24.79 seconds
TestRunnerSetup PASS 545.07 seconds
TestRunner_l2cap-tester PASS 27.89 seconds
TestRunner_iso-tester FAIL 48.79 seconds
TestRunner_bnep-tester PASS 6.08 seconds
TestRunner_mgmt-tester FAIL 112.60 seconds
TestRunner_rfcomm-tester PASS 9.31 seconds
TestRunner_sco-tester FAIL 14.22 seconds
TestRunner_ioctl-tester PASS 10.02 seconds
TestRunner_mesh-tester FAIL 11.45 seconds
TestRunner_smp-tester PASS 8.48 seconds
TestRunner_userchan-tester PASS 6.42 seconds
IncrementalBuild PENDING 0.74 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:
BUG: KASAN: slab-use-after-free in iso_conn_hold_unless_zero+0x76/0x1c0
Total: 141, Passed: 141 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 494, Passed: 488 (98.8%), Failed: 2, Not Run: 4
Failed Test Cases
Read Exp Feature - Success Failed 0.103 seconds
LL Privacy - Set Flags 2 (Enable RL) Failed 0.166 seconds
##############################
Test: TestRunner_sco-tester - FAIL
Desc: Run sco-tester with test-runner
Output:
WARNING: possible circular locking dependency detected
BUG: sleeping function called from invalid context at net/core/sock.c:3782
Total: 30, Passed: 30 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:
Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0
Failed Test Cases
Mesh - Send cancel - 1 Timed out 1.994 seconds
Mesh - Send cancel - 2 Timed out 1.992 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 net-next] net: 6lowpan: replace sprintf() with scnprintf() in debugfs
2026-01-06 17:16 [PATCH v2 net-next] net: 6lowpan: replace sprintf() with scnprintf() in debugfs Kathara Sasikumar
2026-01-06 18:57 ` [v2,net-next] " bluez.test.bot
@ 2026-01-09 2:02 ` Jakub Kicinski
2026-01-09 17:24 ` Simon Horman
2 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2026-01-09 2:02 UTC (permalink / raw)
To: Kathara Sasikumar
Cc: alex.aring, horms, davem, edumazet, pabeni, linux-bluetooth,
linux-wpan, netdev, linux-kernel
On Tue, 6 Jan 2026 17:16:11 +0000 Kathara Sasikumar wrote:
> sprintf() does not perform bounds checking on the destination buffer.
> Replace it with scnprintf() to ensure the write stays within bounds.
Aren't compilers clever enough these days to warn about potential
overflows? AFAICT the buffer is 32B so it will definitely fit %d
no matter what.
--
pw-bot: reject
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 net-next] net: 6lowpan: replace sprintf() with scnprintf() in debugfs
2026-01-06 17:16 [PATCH v2 net-next] net: 6lowpan: replace sprintf() with scnprintf() in debugfs Kathara Sasikumar
2026-01-06 18:57 ` [v2,net-next] " bluez.test.bot
2026-01-09 2:02 ` [PATCH v2 net-next] " Jakub Kicinski
@ 2026-01-09 17:24 ` Simon Horman
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2026-01-09 17:24 UTC (permalink / raw)
To: Kathara Sasikumar
Cc: alex.aring, davem, edumazet, kuba, pabeni, linux-bluetooth,
linux-wpan, netdev, linux-kernel
On Tue, Jan 06, 2026 at 05:16:11PM +0000, Kathara Sasikumar wrote:
> sprintf() does not perform bounds checking on the destination buffer.
> Replace it with scnprintf() to ensure the write stays within bounds.
>
> No functional change intended.
>
> Signed-off-by: Kathara Sasikumar <katharasasikumar007@gmail.com>
> ---
> v2:
> - Updated commit message wording
> - Targeted the patch to net-next
Thanks for the updates.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-09 17:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-06 17:16 [PATCH v2 net-next] net: 6lowpan: replace sprintf() with scnprintf() in debugfs Kathara Sasikumar
2026-01-06 18:57 ` [v2,net-next] " bluez.test.bot
2026-01-09 2:02 ` [PATCH v2 net-next] " Jakub Kicinski
2026-01-09 17:24 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox