* [BlueZ PATCH] gobex: Fix read from pointer after free
@ 2022-02-18 19:46 Tedd Ho-Jeong An
2022-02-18 21:20 ` [BlueZ] " bluez.test.bot
0 siblings, 1 reply; 2+ messages in thread
From: Tedd Ho-Jeong An @ 2022-02-18 19:46 UTC (permalink / raw)
To: linux-bluetooth
From: Tedd Ho-Jeong An <tedd.an@intel.com>
This patch sets the pointer to null after free since the g_free(p)
doesn't set the pointer to NULL.
This is reported by the Coverity.
Fixes: 7e7d826aa1db ("gobex: Print error if data cannot be written")
---
gobex/gobex.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gobex/gobex.c b/gobex/gobex.c
index 185eed4d7..e9b89cead 100644
--- a/gobex/gobex.c
+++ b/gobex/gobex.c
@@ -471,6 +471,8 @@ encode:
check_srm_final(obex,
obex->tx_buf[0] & ~FINAL_BIT);
pending_pkt_free(p);
+ /* g_free() doesn't set the pointer to NULL */
+ p = NULL;
}
obex->tx_data = len;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [BlueZ] gobex: Fix read from pointer after free
2022-02-18 19:46 [BlueZ PATCH] gobex: Fix read from pointer after free Tedd Ho-Jeong An
@ 2022-02-18 21:20 ` bluez.test.bot
0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2022-02-18 21:20 UTC (permalink / raw)
To: linux-bluetooth, hj.tedd.an
[-- Attachment #1: Type: text/plain, Size: 1935 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=615864
---Test result---
Test Summary:
CheckPatch FAIL 1.51 seconds
GitLint PASS 1.03 seconds
Prep - Setup ELL PASS 39.27 seconds
Build - Prep PASS 0.71 seconds
Build - Configure PASS 8.01 seconds
Build - Make PASS 1327.50 seconds
Make Check PASS 11.31 seconds
Make Check w/Valgrind PASS 405.40 seconds
Make Distcheck PASS 213.79 seconds
Build w/ext ELL - Configure PASS 8.08 seconds
Build w/ext ELL - Make PASS 1305.72 seconds
Incremental Build with patchesPASS 0.00 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script with rule in .checkpatch.conf
Output:
[BlueZ] gobex: Fix read from pointer after free
WARNING:UNKNOWN_COMMIT_ID: Unknown commit id '7e7d826aa1db', maybe rebased or not pulled?
#84:
Fixes: 7e7d826aa1db ("gobex: Print error if data cannot be written")
/github/workspace/src/12751809.patch total: 0 errors, 1 warnings, 8 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/12751809.patch has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-18 21:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-18 19:46 [BlueZ PATCH] gobex: Fix read from pointer after free Tedd Ho-Jeong An
2022-02-18 21:20 ` [BlueZ] " bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).