Message ID | 20230526084038.2199788-1-iam@sung-woo.kim (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | warning | WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line) #79: CPU: 0 PID: 276 Comm: kworker/u3:0 Not tainted 6.2.0-00001-gef397bd4d5fb-dirty #59 total: 0 errors, 1 warnings, 0 checks, 9 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. /github/workspace/src/src/13256604.patch has style problems, please review. NOTE: Ignored message types: UNKNOWN_COMMIT_ID NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. |
tedd_an/GitLint | fail | WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search 8: B1 Line exceeds max length (92>80): "BUG: KASAN: use-after-free in l2cap_sock_ready_cb+0xb7/0x100 net/bluetooth/l2cap_sock.c:1650" 11: B1 Line exceeds max length (82>80): "CPU: 0 PID: 276 Comm: kworker/u3:0 Not tainted 6.2.0-00001-gef397bd4d5fb-dirty #59" 100: B1 Line exceeds max length (106>80): "page:00000000dbca6a80 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888104614000 pfn:0x104614" 101: B1 Line exceeds max length (89>80): "head:00000000dbca6a80 order:2 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0" |
tedd_an/SubjectPrefix | success | Gitlint PASS |
tedd_an/BuildKernel | fail | BuildKernel: FAIL: net/bluetooth/l2cap_sock.c: In function ‘l2cap_sock_release’: net/bluetooth/l2cap_sock.c:1418:2: error: implicit declaration of function ‘l2cap_sock_cleanup_listen’; did you mean ‘l2cap_sock_listen’? [-Werror=implicit-function-declaration] 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | l2cap_sock_listen net/bluetooth/l2cap_sock.c: At top level: net/bluetooth/l2cap_sock.c:1436:13: warning: conflicting types for ‘l2cap_sock_cleanup_listen’ 1436 | static void l2cap_sock_cleanup_listen(struct sock *parent) | ^~~~~~~~~~~~~~~~~~~~~~~~~ net/bluetooth/l2cap_sock.c:1436:13: error: static declaration of ‘l2cap_sock_cleanup_listen’ follows non-static declaration net/bluetooth/l2cap_sock.c:1418:2: note: previous implicit declaration of ‘l2cap_sock_cleanup_listen’ was here 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:252: net/bluetooth/l2cap_sock.o] Error 1 make[2]: *** [scripts/Makefile.build:494: net/bluetooth] Error 2 make[1]: *** [scripts/Makefile.build:494: net] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:2025: .] Error 2 |
tedd_an/CheckAllWarning | fail | CheckAllWarning: FAIL: net/bluetooth/l2cap_sock.c: In function ‘l2cap_sock_release’: net/bluetooth/l2cap_sock.c:1418:2: error: implicit declaration of function ‘l2cap_sock_cleanup_listen’; did you mean ‘l2cap_sock_listen’? [-Werror=implicit-function-declaration] 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | l2cap_sock_listen net/bluetooth/l2cap_sock.c: At top level: net/bluetooth/l2cap_sock.c:1436:13: warning: conflicting types for ‘l2cap_sock_cleanup_listen’ 1436 | static void l2cap_sock_cleanup_listen(struct sock *parent) | ^~~~~~~~~~~~~~~~~~~~~~~~~ net/bluetooth/l2cap_sock.c:1436:13: error: static declaration of ‘l2cap_sock_cleanup_listen’ follows non-static declaration net/bluetooth/l2cap_sock.c:1418:2: note: previous implicit declaration of ‘l2cap_sock_cleanup_listen’ was here 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:252: net/bluetooth/l2cap_sock.o] Error 1 make[2]: *** [scripts/Makefile.build:494: net/bluetooth] Error 2 make[1]: *** [scripts/Makefile.build:494: net] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:2025: .] Error 2 |
tedd_an/CheckSparse | fail | CheckSparse: FAIL: net/bluetooth/af_bluetooth.c:178:25: warning: context imbalance in 'bt_accept_enqueue' - different lock contexts for basic block drivers/bluetooth/hci_ag6xx.c:257:24: warning: restricted __le32 degrades to integer drivers/bluetooth/hci_mrvl.c:170:23: warning: restricted __le16 degrades to integer drivers/bluetooth/hci_mrvl.c:203:23: warning: restricted __le16 degrades to integer net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h): ./include/net/bluetooth/hci.h:2647:47: warning: array of flexible structures ./include/net/bluetooth/hci.h:2733:43: warning: array of flexible structures drivers/bluetooth/btmtksdio.c:557:63: warning: Using plain integer as NULL pointer drivers/bluetooth/btmtksdio.c:579:55: warning: Using plain integer as NULL pointer drivers/bluetooth/btmtksdio.c:611:63: warning: Using plain integer as NULL pointer drivers/bluetooth/btmtksdio.c:624:63: warning: Using plain integer as NULL pointer net/bluetooth/l2cap_sock.c: In function ‘l2cap_sock_release’: net/bluetooth/l2cap_sock.c:1418:2: error: implicit declaration of function ‘l2cap_sock_cleanup_listen’; did you mean ‘l2cap_sock_listen’? [-Werror=implicit-function-declaration] 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | l2cap_sock_listen net/bluetooth/l2cap_sock.c: At top level: net/bluetooth/l2cap_sock.c:1436:13: warning: conflicting types for ‘l2cap_sock_cleanup_listen’ 1436 | static void l2cap_sock_cleanup_listen(struct sock *parent) | ^~~~~~~~~~~~~~~~~~~~~~~~~ net/bluetooth/l2cap_sock.c:1436:13: error: static declaration of ‘l2cap_sock_cleanup_listen’ follows non-static declaration net/bluetooth/l2cap_sock.c:1418:2: note: previous implicit declaration of ‘l2cap_sock_cleanup_listen’ was here 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:252: net/bluetooth/l2cap_sock.o] Error 1 make[2]: *** [scripts/Makefile.build:494: net/bluetooth] Error 2 make[1]: *** [scripts/Makefile.build:494: net] Error 2 make[1]: *** Waiting for unfinished jobs.... drivers/bluetooth/hci_nokia.c:284:23: warning: incorrect type in assignment (different base types) drivers/bluetooth/hci_nokia.c:284:23: expected unsigned short [usertype] baud drivers/bluetooth/hci_nokia.c:284:23: got restricted __le16 [usertype] drivers/bluetooth/hci_nokia.c:287:26: warning: incorrect type in assignment (different base types) drivers/bluetooth/hci_nokia.c:287:26: expected unsigned short [usertype] sys_clk drivers/bluetooth/hci_nokia.c:287:26: got restricted __le16 [usertype] make: *** [Makefile:2025: .] Error 2 |
tedd_an/CheckSmatch | fail | CheckSparse: FAIL: net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h): ./include/net/bluetooth/hci.h:2647:47: warning: array of flexible structures ./include/net/bluetooth/hci.h:2733:43: warning: array of flexible structures net/bluetooth/l2cap_sock.c: In function ‘l2cap_sock_release’: net/bluetooth/l2cap_sock.c:1418:2: error: implicit declaration of function ‘l2cap_sock_cleanup_listen’; did you mean ‘l2cap_sock_listen’? [-Werror=implicit-function-declaration] 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | l2cap_sock_listen net/bluetooth/l2cap_sock.c: At top level: net/bluetooth/l2cap_sock.c:1436:13: warning: conflicting types for ‘l2cap_sock_cleanup_listen’ 1436 | static void l2cap_sock_cleanup_listen(struct sock *parent) | ^~~~~~~~~~~~~~~~~~~~~~~~~ net/bluetooth/l2cap_sock.c:1436:13: error: static declaration of ‘l2cap_sock_cleanup_listen’ follows non-static declaration net/bluetooth/l2cap_sock.c:1418:2: note: previous implicit declaration of ‘l2cap_sock_cleanup_listen’ was here 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:252: net/bluetooth/l2cap_sock.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [scripts/Makefile.build:494: net/bluetooth] Error 2 make[1]: *** [scripts/Makefile.build:494: net] Error 2 make: *** [Makefile:2025: .] Error 2 |
tedd_an/BuildKernel32 | fail | BuildKernel32: FAIL: net/bluetooth/l2cap_sock.c: In function ‘l2cap_sock_release’: net/bluetooth/l2cap_sock.c:1418:2: error: implicit declaration of function ‘l2cap_sock_cleanup_listen’; did you mean ‘l2cap_sock_listen’? [-Werror=implicit-function-declaration] 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | l2cap_sock_listen net/bluetooth/l2cap_sock.c: At top level: net/bluetooth/l2cap_sock.c:1436:13: warning: conflicting types for ‘l2cap_sock_cleanup_listen’ 1436 | static void l2cap_sock_cleanup_listen(struct sock *parent) | ^~~~~~~~~~~~~~~~~~~~~~~~~ net/bluetooth/l2cap_sock.c:1436:13: error: static declaration of ‘l2cap_sock_cleanup_listen’ follows non-static declaration net/bluetooth/l2cap_sock.c:1418:2: note: previous implicit declaration of ‘l2cap_sock_cleanup_listen’ was here 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:252: net/bluetooth/l2cap_sock.o] Error 1 make[2]: *** [scripts/Makefile.build:494: net/bluetooth] Error 2 make[1]: *** [scripts/Makefile.build:494: net] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:2025: .] Error 2 |
tedd_an/TestRunnerSetup | fail | Kernel Build FAIL: net/bluetooth/l2cap_sock.c: In function ‘l2cap_sock_release’: net/bluetooth/l2cap_sock.c:1418:2: error: implicit declaration of function ‘l2cap_sock_cleanup_listen’; did you mean ‘l2cap_sock_listen’? [-Werror=implicit-function-declaration] 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | l2cap_sock_listen net/bluetooth/l2cap_sock.c: At top level: net/bluetooth/l2cap_sock.c:1436:13: warning: conflicting types for ‘l2cap_sock_cleanup_listen’ 1436 | static void l2cap_sock_cleanup_listen(struct sock *parent) | ^~~~~~~~~~~~~~~~~~~~~~~~~ net/bluetooth/l2cap_sock.c:1436:13: error: static declaration of ‘l2cap_sock_cleanup_listen’ follows non-static declaration net/bluetooth/l2cap_sock.c:1418:2: note: previous implicit declaration of ‘l2cap_sock_cleanup_listen’ was here 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:252: net/bluetooth/l2cap_sock.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [scripts/Makefile.build:494: net/bluetooth] Error 2 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [scripts/Makefile.build:494: net] Error 2 make: *** [Makefile:2025: .] Error 2 |
tedd_an/TestRunner_l2cap-tester | fail | Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory |
tedd_an/TestRunner_iso-tester | fail | Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory |
tedd_an/TestRunner_bnep-tester | fail | Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory |
tedd_an/TestRunner_mgmt-tester | fail | Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory |
tedd_an/TestRunner_rfcomm-tester | fail | Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory |
tedd_an/TestRunner_sco-tester | fail | Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory |
tedd_an/TestRunner_ioctl-tester | fail | Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory |
tedd_an/TestRunner_mesh-tester | fail | Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory |
tedd_an/TestRunner_smp-tester | fail | Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory |
tedd_an/TestRunner_userchan-tester | fail | Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory |
tedd_an/IncrementalBuild | fail | Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb net/bluetooth/l2cap_sock.c: In function ‘l2cap_sock_release’: net/bluetooth/l2cap_sock.c:1418:2: error: implicit declaration of function ‘l2cap_sock_cleanup_listen’; did you mean ‘l2cap_sock_listen’? [-Werror=implicit-function-declaration] 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | l2cap_sock_listen net/bluetooth/l2cap_sock.c: At top level: net/bluetooth/l2cap_sock.c:1436:13: warning: conflicting types for ‘l2cap_sock_cleanup_listen’ 1436 | static void l2cap_sock_cleanup_listen(struct sock *parent) | ^~~~~~~~~~~~~~~~~~~~~~~~~ net/bluetooth/l2cap_sock.c:1436:13: error: static declaration of ‘l2cap_sock_cleanup_listen’ follows non-static declaration net/bluetooth/l2cap_sock.c:1418:2: note: previous implicit declaration of ‘l2cap_sock_cleanup_listen’ was here 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:252: net/bluetooth/l2cap_sock.o] Error 1 make[2]: *** [scripts/Makefile.build:494: net/bluetooth] Error 2 make[1]: *** [scripts/Makefile.build:494: net] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:2025: .] Error 2 |
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=751281 ---Test result--- Test Summary: CheckPatch FAIL 0.99 seconds GitLint FAIL 0.61 seconds SubjectPrefix PASS 0.10 seconds BuildKernel FAIL 30.16 seconds CheckAllWarning FAIL 33.19 seconds CheckSparse FAIL 36.21 seconds CheckSmatch FAIL 102.03 seconds BuildKernel32 FAIL 28.81 seconds TestRunnerSetup FAIL 494.82 seconds TestRunner_l2cap-tester FAIL 0.12 seconds TestRunner_iso-tester FAIL 0.13 seconds TestRunner_bnep-tester FAIL 0.12 seconds TestRunner_mgmt-tester FAIL 0.13 seconds TestRunner_rfcomm-tester FAIL 0.13 seconds TestRunner_sco-tester FAIL 0.13 seconds TestRunner_ioctl-tester FAIL 0.12 seconds TestRunner_mesh-tester FAIL 0.12 seconds TestRunner_smp-tester FAIL 0.12 seconds TestRunner_userchan-tester FAIL 0.13 seconds IncrementalBuild FAIL 26.61 seconds Details ############################## Test: CheckPatch - FAIL Desc: Run checkpatch.pl script Output: Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line) #79: CPU: 0 PID: 276 Comm: kworker/u3:0 Not tainted 6.2.0-00001-gef397bd4d5fb-dirty #59 total: 0 errors, 1 warnings, 0 checks, 9 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. /github/workspace/src/src/13256604.patch has style problems, please review. NOTE: Ignored message types: UNKNOWN_COMMIT_ID NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. ############################## Test: GitLint - FAIL Desc: Run gitlint Output: Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search 8: B1 Line exceeds max length (92>80): "BUG: KASAN: use-after-free in l2cap_sock_ready_cb+0xb7/0x100 net/bluetooth/l2cap_sock.c:1650" 11: B1 Line exceeds max length (82>80): "CPU: 0 PID: 276 Comm: kworker/u3:0 Not tainted 6.2.0-00001-gef397bd4d5fb-dirty #59" 100: B1 Line exceeds max length (106>80): "page:00000000dbca6a80 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888104614000 pfn:0x104614" 101: B1 Line exceeds max length (89>80): "head:00000000dbca6a80 order:2 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0" ############################## Test: BuildKernel - FAIL Desc: Build Kernel for Bluetooth Output: net/bluetooth/l2cap_sock.c: In function ‘l2cap_sock_release’: net/bluetooth/l2cap_sock.c:1418:2: error: implicit declaration of function ‘l2cap_sock_cleanup_listen’; did you mean ‘l2cap_sock_listen’? [-Werror=implicit-function-declaration] 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | l2cap_sock_listen net/bluetooth/l2cap_sock.c: At top level: net/bluetooth/l2cap_sock.c:1436:13: warning: conflicting types for ‘l2cap_sock_cleanup_listen’ 1436 | static void l2cap_sock_cleanup_listen(struct sock *parent) | ^~~~~~~~~~~~~~~~~~~~~~~~~ net/bluetooth/l2cap_sock.c:1436:13: error: static declaration of ‘l2cap_sock_cleanup_listen’ follows non-static declaration net/bluetooth/l2cap_sock.c:1418:2: note: previous implicit declaration of ‘l2cap_sock_cleanup_listen’ was here 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:252: net/bluetooth/l2cap_sock.o] Error 1 make[2]: *** [scripts/Makefile.build:494: net/bluetooth] Error 2 make[1]: *** [scripts/Makefile.build:494: net] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:2025: .] Error 2 ############################## Test: CheckAllWarning - FAIL Desc: Run linux kernel with all warning enabled Output: net/bluetooth/l2cap_sock.c: In function ‘l2cap_sock_release’: net/bluetooth/l2cap_sock.c:1418:2: error: implicit declaration of function ‘l2cap_sock_cleanup_listen’; did you mean ‘l2cap_sock_listen’? [-Werror=implicit-function-declaration] 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | l2cap_sock_listen net/bluetooth/l2cap_sock.c: At top level: net/bluetooth/l2cap_sock.c:1436:13: warning: conflicting types for ‘l2cap_sock_cleanup_listen’ 1436 | static void l2cap_sock_cleanup_listen(struct sock *parent) | ^~~~~~~~~~~~~~~~~~~~~~~~~ net/bluetooth/l2cap_sock.c:1436:13: error: static declaration of ‘l2cap_sock_cleanup_listen’ follows non-static declaration net/bluetooth/l2cap_sock.c:1418:2: note: previous implicit declaration of ‘l2cap_sock_cleanup_listen’ was here 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:252: net/bluetooth/l2cap_sock.o] Error 1 make[2]: *** [scripts/Makefile.build:494: net/bluetooth] Error 2 make[1]: *** [scripts/Makefile.build:494: net] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:2025: .] Error 2 ############################## Test: CheckSparse - FAIL Desc: Run sparse tool with linux kernel Output: net/bluetooth/af_bluetooth.c:178:25: warning: context imbalance in 'bt_accept_enqueue' - different lock contexts for basic block drivers/bluetooth/hci_ag6xx.c:257:24: warning: restricted __le32 degrades to integer drivers/bluetooth/hci_mrvl.c:170:23: warning: restricted __le16 degrades to integer drivers/bluetooth/hci_mrvl.c:203:23: warning: restricted __le16 degrades to integer net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h): ./include/net/bluetooth/hci.h:2647:47: warning: array of flexible structures ./include/net/bluetooth/hci.h:2733:43: warning: array of flexible structures drivers/bluetooth/btmtksdio.c:557:63: warning: Using plain integer as NULL pointer drivers/bluetooth/btmtksdio.c:579:55: warning: Using plain integer as NULL pointer drivers/bluetooth/btmtksdio.c:611:63: warning: Using plain integer as NULL pointer drivers/bluetooth/btmtksdio.c:624:63: warning: Using plain integer as NULL pointer net/bluetooth/l2cap_sock.c: In function ‘l2cap_sock_release’: net/bluetooth/l2cap_sock.c:1418:2: error: implicit declaration of function ‘l2cap_sock_cleanup_listen’; did you mean ‘l2cap_sock_listen’? [-Werror=implicit-function-declaration] 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | l2cap_sock_listen net/bluetooth/l2cap_sock.c: At top level: net/bluetooth/l2cap_sock.c:1436:13: warning: conflicting types for ‘l2cap_sock_cleanup_listen’ 1436 | static void l2cap_sock_cleanup_listen(struct sock *parent) | ^~~~~~~~~~~~~~~~~~~~~~~~~ net/bluetooth/l2cap_sock.c:1436:13: error: static declaration of ‘l2cap_sock_cleanup_listen’ follows non-static declaration net/bluetooth/l2cap_sock.c:1418:2: note: previous implicit declaration of ‘l2cap_sock_cleanup_listen’ was here 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:252: net/bluetooth/l2cap_sock.o] Error 1 make[2]: *** [scripts/Makefile.build:494: net/bluetooth] Error 2 make[1]: *** [scripts/Makefile.build:494: net] Error 2 make[1]: *** Waiting for unfinished jobs.... drivers/bluetooth/hci_nokia.c:284:23: warning: incorrect type in assignment (different base types) drivers/bluetooth/hci_nokia.c:284:23: expected unsigned short [usertype] baud drivers/bluetooth/hci_nokia.c:284:23: got restricted __le16 [usertype] drivers/bluetooth/hci_nokia.c:287:26: warning: incorrect type in assignment (different base types) drivers/bluetooth/hci_nokia.c:287:26: expected unsigned short [usertype] sys_clk drivers/bluetooth/hci_nokia.c:287:26: got restricted __le16 [usertype] make: *** [Makefile:2025: .] Error 2 ############################## Test: CheckSmatch - FAIL Desc: Run smatch tool with source Output: net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h): ./include/net/bluetooth/hci.h:2647:47: warning: array of flexible structures ./include/net/bluetooth/hci.h:2733:43: warning: array of flexible structures net/bluetooth/l2cap_sock.c: In function ‘l2cap_sock_release’: net/bluetooth/l2cap_sock.c:1418:2: error: implicit declaration of function ‘l2cap_sock_cleanup_listen’; did you mean ‘l2cap_sock_listen’? [-Werror=implicit-function-declaration] 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | l2cap_sock_listen net/bluetooth/l2cap_sock.c: At top level: net/bluetooth/l2cap_sock.c:1436:13: warning: conflicting types for ‘l2cap_sock_cleanup_listen’ 1436 | static void l2cap_sock_cleanup_listen(struct sock *parent) | ^~~~~~~~~~~~~~~~~~~~~~~~~ net/bluetooth/l2cap_sock.c:1436:13: error: static declaration of ‘l2cap_sock_cleanup_listen’ follows non-static declaration net/bluetooth/l2cap_sock.c:1418:2: note: previous implicit declaration of ‘l2cap_sock_cleanup_listen’ was here 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:252: net/bluetooth/l2cap_sock.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [scripts/Makefile.build:494: net/bluetooth] Error 2 make[1]: *** [scripts/Makefile.build:494: net] Error 2 make: *** [Makefile:2025: .] Error 2 ############################## Test: BuildKernel32 - FAIL Desc: Build 32bit Kernel for Bluetooth Output: net/bluetooth/l2cap_sock.c: In function ‘l2cap_sock_release’: net/bluetooth/l2cap_sock.c:1418:2: error: implicit declaration of function ‘l2cap_sock_cleanup_listen’; did you mean ‘l2cap_sock_listen’? [-Werror=implicit-function-declaration] 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | l2cap_sock_listen net/bluetooth/l2cap_sock.c: At top level: net/bluetooth/l2cap_sock.c:1436:13: warning: conflicting types for ‘l2cap_sock_cleanup_listen’ 1436 | static void l2cap_sock_cleanup_listen(struct sock *parent) | ^~~~~~~~~~~~~~~~~~~~~~~~~ net/bluetooth/l2cap_sock.c:1436:13: error: static declaration of ‘l2cap_sock_cleanup_listen’ follows non-static declaration net/bluetooth/l2cap_sock.c:1418:2: note: previous implicit declaration of ‘l2cap_sock_cleanup_listen’ was here 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:252: net/bluetooth/l2cap_sock.o] Error 1 make[2]: *** [scripts/Makefile.build:494: net/bluetooth] Error 2 make[1]: *** [scripts/Makefile.build:494: net] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:2025: .] Error 2 ############################## Test: TestRunnerSetup - FAIL Desc: Setup kernel and bluez for test-runner Output: Kernel: net/bluetooth/l2cap_sock.c: In function ‘l2cap_sock_release’: net/bluetooth/l2cap_sock.c:1418:2: error: implicit declaration of function ‘l2cap_sock_cleanup_listen’; did you mean ‘l2cap_sock_listen’? [-Werror=implicit-function-declaration] 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | l2cap_sock_listen net/bluetooth/l2cap_sock.c: At top level: net/bluetooth/l2cap_sock.c:1436:13: warning: conflicting types for ‘l2cap_sock_cleanup_listen’ 1436 | static void l2cap_sock_cleanup_listen(struct sock *parent) | ^~~~~~~~~~~~~~~~~~~~~~~~~ net/bluetooth/l2cap_sock.c:1436:13: error: static declaration of ‘l2cap_sock_cleanup_listen’ follows non-static declaration net/bluetooth/l2cap_sock.c:1418:2: note: previous implicit declaration of ‘l2cap_sock_cleanup_listen’ was here 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:252: net/bluetooth/l2cap_sock.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [scripts/Makefile.build:494: net/bluetooth] Error 2 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [scripts/Makefile.build:494: net] Error 2 make: *** [Makefile:2025: .] Error 2 ############################## Test: TestRunner_l2cap-tester - FAIL Desc: Run l2cap-tester with test-runner Output: Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory ############################## Test: TestRunner_iso-tester - FAIL Desc: Run iso-tester with test-runner Output: Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory ############################## Test: TestRunner_bnep-tester - FAIL Desc: Run bnep-tester with test-runner Output: Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory ############################## Test: TestRunner_mgmt-tester - FAIL Desc: Run mgmt-tester with test-runner Output: Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory ############################## Test: TestRunner_rfcomm-tester - FAIL Desc: Run rfcomm-tester with test-runner Output: Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory ############################## Test: TestRunner_sco-tester - FAIL Desc: Run sco-tester with test-runner Output: Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory ############################## Test: TestRunner_ioctl-tester - FAIL Desc: Run ioctl-tester with test-runner Output: Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory ############################## Test: TestRunner_mesh-tester - FAIL Desc: Run mesh-tester with test-runner Output: Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory ############################## Test: TestRunner_smp-tester - FAIL Desc: Run smp-tester with test-runner Output: Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory ############################## Test: TestRunner_userchan-tester - FAIL Desc: Run userchan-tester with test-runner Output: Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory qemu-system-x86_64: Back to tcg accelerator qemu: could not open kernel file '/github/workspace/src/src/arch/x86/boot/bzImage': No such file or directory ############################## Test: IncrementalBuild - FAIL Desc: Incremental build with the patches in the series Output: Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb net/bluetooth/l2cap_sock.c: In function ‘l2cap_sock_release’: net/bluetooth/l2cap_sock.c:1418:2: error: implicit declaration of function ‘l2cap_sock_cleanup_listen’; did you mean ‘l2cap_sock_listen’? [-Werror=implicit-function-declaration] 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | l2cap_sock_listen net/bluetooth/l2cap_sock.c: At top level: net/bluetooth/l2cap_sock.c:1436:13: warning: conflicting types for ‘l2cap_sock_cleanup_listen’ 1436 | static void l2cap_sock_cleanup_listen(struct sock *parent) | ^~~~~~~~~~~~~~~~~~~~~~~~~ net/bluetooth/l2cap_sock.c:1436:13: error: static declaration of ‘l2cap_sock_cleanup_listen’ follows non-static declaration net/bluetooth/l2cap_sock.c:1418:2: note: previous implicit declaration of ‘l2cap_sock_cleanup_listen’ was here 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:252: net/bluetooth/l2cap_sock.o] Error 1 make[2]: *** [scripts/Makefile.build:494: net/bluetooth] Error 2 make[1]: *** [scripts/Makefile.build:494: net] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:2025: .] Error 2 --- Regards, Linux Bluetooth
Hi Sungwoo, kernel test robot noticed the following build errors: [auto build test ERROR on bluetooth/master] [also build test ERROR on bluetooth-next/master linus/master v6.4-rc3 next-20230525] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Sungwoo-Kim/Bluetooth-L2CAP-Fix-use-after-free-in-l2cap_sock_ready_cb/20230526-164241 base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master patch link: https://lore.kernel.org/r/20230526084038.2199788-1-iam%40sung-woo.kim patch subject: [PATCH] Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20230526/202305261912.mKLcy6Fw-lkp@intel.com/config) compiler: powerpc-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): mkdir -p ~/bin wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/c0c02b1afbe2667fe21aed47375c4e0d45713f38 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Sungwoo-Kim/Bluetooth-L2CAP-Fix-use-after-free-in-l2cap_sock_ready_cb/20230526-164241 git checkout c0c02b1afbe2667fe21aed47375c4e0d45713f38 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 ~/bin/make.cross W=1 O=build_dir ARCH=powerpc olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 ~/bin/make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash net/bluetooth/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202305261912.mKLcy6Fw-lkp@intel.com/ All error/warnings (new ones prefixed by >>): net/bluetooth/l2cap_sock.c: In function 'l2cap_sock_release': >> net/bluetooth/l2cap_sock.c:1418:9: error: implicit declaration of function 'l2cap_sock_cleanup_listen'; did you mean 'l2cap_sock_listen'? [-Werror=implicit-function-declaration] 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | l2cap_sock_listen net/bluetooth/l2cap_sock.c: At top level: >> net/bluetooth/l2cap_sock.c:1436:13: warning: conflicting types for 'l2cap_sock_cleanup_listen'; have 'void(struct sock *)' 1436 | static void l2cap_sock_cleanup_listen(struct sock *parent) | ^~~~~~~~~~~~~~~~~~~~~~~~~ >> net/bluetooth/l2cap_sock.c:1436:13: error: static declaration of 'l2cap_sock_cleanup_listen' follows non-static declaration net/bluetooth/l2cap_sock.c:1418:9: note: previous implicit declaration of 'l2cap_sock_cleanup_listen' with type 'void(struct sock *)' 1418 | l2cap_sock_cleanup_listen(sk); | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +1418 net/bluetooth/l2cap_sock.c 1406 1407 static int l2cap_sock_release(struct socket *sock) 1408 { 1409 struct sock *sk = sock->sk; 1410 int err; 1411 struct l2cap_chan *chan; 1412 1413 BT_DBG("sock %p, sk %p", sock, sk); 1414 1415 if (!sk) 1416 return 0; 1417 > 1418 l2cap_sock_cleanup_listen(sk); 1419 bt_sock_unlink(&l2cap_sk_list, sk); 1420 1421 err = l2cap_sock_shutdown(sock, SHUT_RDWR); 1422 chan = l2cap_pi(sk)->chan; 1423 1424 l2cap_chan_hold(chan); 1425 l2cap_chan_lock(chan); 1426 1427 sock_orphan(sk); 1428 l2cap_sock_kill(sk); 1429 1430 l2cap_chan_unlock(chan); 1431 l2cap_chan_put(chan); 1432 1433 return err; 1434 } 1435 > 1436 static void l2cap_sock_cleanup_listen(struct sock *parent) 1437 { 1438 struct sock *sk; 1439 1440 BT_DBG("parent %p state %s", parent, 1441 state_to_string(parent->sk_state)); 1442 1443 /* Close not yet accepted channels */ 1444 while ((sk = bt_accept_dequeue(parent, NULL))) { 1445 struct l2cap_chan *chan = l2cap_pi(sk)->chan; 1446 1447 BT_DBG("child chan %p state %s", chan, 1448 state_to_string(chan->state)); 1449 1450 l2cap_chan_hold(chan); 1451 l2cap_chan_lock(chan); 1452 1453 __clear_chan_timer(chan); 1454 l2cap_chan_close(chan, ECONNRESET); 1455 l2cap_sock_kill(sk); 1456 1457 l2cap_chan_unlock(chan); 1458 l2cap_chan_put(chan); 1459 } 1460 } 1461
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index eebe25610..ddd940a46 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c @@ -1414,7 +1414,8 @@ static int l2cap_sock_release(struct socket *sock) if (!sk) return 0; - + + l2cap_sock_cleanup_listen(sk); bt_sock_unlink(&l2cap_sk_list, sk); err = l2cap_sock_shutdown(sock, SHUT_RDWR);