diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-07-15 11:01:20 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-11-12 14:00:31 -0800 |
commit | e79417ed7185b150a056d4eb3a1ab528b91d2fc0 (patch) | |
tree | 47c490359d7072258522d75e3bee5a2da8755bc3 /src/sdpd.h | |
parent | 44789fb8d94839d9c2b847d71faa6d649138b128 (diff) | |
download | bluez-e79417ed7185b150a056d4eb3a1ab528b91d2fc0.tar.gz |
sdpd: Fix leaking buffers stored in cstates cache
These buffer shall only be keep in cache for as long as they are
needed so this would cleanup any client cstates in the following
conditions:
- There is no cstate on the response
- No continuation can be found for cstate
- Different request opcode
- Respond with an error
- Client disconnect
Fixes: https://github.com/bluez/bluez/security/advisories/GHSA-3fqg-r8j5-f5xq
Diffstat (limited to 'src/sdpd.h')
-rw-r--r-- | src/sdpd.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sdpd.h b/src/sdpd.h index 9488535d3..d4b8f2f5b 100644 --- a/src/sdpd.h +++ b/src/sdpd.h @@ -27,8 +27,11 @@ typedef struct request { int flags; uint8_t *buf; int len; + uint8_t opcode; } sdp_req_t; +void sdp_cstate_cleanup(int sock); + void handle_internal_request(int sk, int mtu, void *data, int len); void handle_request(int sk, uint8_t *data, int len); |