summaryrefslogtreecommitdiff
path: root/src/sdpd-request.c
Commit message (Collapse)AuthorAgeFilesLines
* sdpd: Fix leaking buffers stored in cstates cacheLuiz Augusto von Dentz2021-11-121-49/+121
| | | | | | | | | | | | | | 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
* src: Add SPDX License IdentifierTedd Ho-Jeong An2020-09-211-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds SPDX License Identifier and removes the license text. ------------------------------------- License COUNT ------------------------------------- LGPL-2.1-or-later : 62 GPL-2.0-or-later : 51 BSD-2-Clause : 2 License: LGPL-2.1-or-later src/adv_monitor.c src/adv_monitor.h src/shared/mainloop-glib.c src/shared/btp.c src/shared/tester.c src/shared/btsnoop.c src/shared/gatt-helpers.h src/shared/log.h src/shared/util.h src/shared/mainloop-ell.c src/shared/hci-crypto.c src/shared/mainloop.c src/shared/hfp.h src/shared/mainloop-notify.c src/shared/io-mainloop.c src/shared/btsnoop.h src/shared/uhid.h src/shared/util.c src/shared/ringbuf.c src/shared/btp.h src/shared/shell.h src/shared/io-glib.c src/shared/queue.h src/shared/gatt-server.h src/shared/crypto.c src/shared/crypto.h src/shared/io-ell.c src/shared/timeout-glib.c src/shared/mgmt.c src/shared/gatt-db.c src/shared/mainloop-notify.h src/shared/hfp.c src/shared/timeout-ell.c src/shared/shell.c src/shared/hci.c src/shared/log.c src/shared/ringbuf.h src/shared/gatt-helpers.c src/shared/queue.c src/shared/tty.h src/shared/timeout-mainloop.c src/shared/tester.h src/shared/gap.h src/shared/mgmt.h src/shared/gatt-db.h src/shared/uhid.c src/shared/mainloop.h src/shared/timeout.h src/shared/att-types.h src/shared/pcap.c src/shared/gap.c src/shared/att.c src/shared/pcap.h src/shared/hci.h src/shared/gatt-client.h src/shared/io.h src/shared/gatt-client.c src/shared/ad.c src/shared/att.h src/shared/gatt-server.c src/shared/hci-crypto.h src/shared/ad.h License: GPL-2.0-or-later src/attrib-server.h src/advertising.h src/textfile.c src/attrib-server.c src/uinput.h src/log.h src/eir.h src/sdpd.h src/sdpd-request.c src/service.h src/sdpd-database.c src/adapter.h src/plugin.h src/uuid-helper.h src/plugin.c src/main.c src/sdp-xml.c src/error.h src/oui.c src/device.c src/agent.h src/sdp-client.c src/oui.h src/device.h src/gatt-database.c src/error.c src/backtrace.c src/sdpd-server.c src/adapter.c src/log.c src/agent.c src/backtrace.h src/sdp-xml.h src/hcid.h src/dbus-common.h src/uuid-helper.c src/storage.c src/profile.c src/advertising.c src/storage.h src/dbus-common.c src/profile.h src/sdpd-service.c src/eir.c src/sdp-client.h src/gatt-database.h src/gatt-client.h src/rfkill.c src/gatt-client.c src/service.c src/textfile.h License: BSD-2-Clause src/shared/ecc.h src/shared/ecc.c
* sdp: Fix not checking if cstate lengthLuiz Augusto von Dentz2018-11-021-35/+39
| | | | | | | | | | cstate length should be smaller than cached length otherwise the request shall be considered invalid as the data is not within the cached buffer. An independent security researcher, Julian Rauchberger, has reported this vulnerability to Beyond Security’s SecuriTeam Secure Disclosure program.
* sdp: Fix Out-of-bounds heap read in service_search_attr_req functionLuiz Augusto von Dentz2017-09-131-1/+1
| | | | Check if there is enough data to continue otherwise return an error.
* core: Use local libbluetooth includesMarcel Holtmann2015-02-281-4/+4
|
* sdp: Add initial support for MPSSzymon Janc2015-02-171-0/+1
| | | | | | | | | | | | | This allows to register Multi Profile Specification record with proper MPSD bits set depending on currently registered services. Service Name: Multi Profile Service RecHandle: 0x10001 Service Class ID List: "" (0x113b) Profile Descriptor List: "" (0x113a) Version: 0x0100
* Replace bt_put_be32() by put_be32()Claudio Takahasi2014-03-241-2/+2
|
* Replace bt_put_be16() by put_be16()Claudio Takahasi2014-03-241-10/+10
|
* Replace bt_get_be32() by get_be32()Claudio Takahasi2014-03-241-2/+2
|
* Replace bt_get_be16() by get_be16()Claudio Takahasi2014-03-241-5/+7
|
* core: Remove redundant includes from sdpd-*.cFrederic Danis2013-07-121-5/+0
|
* core: Add function for handling internal SDP processingMarcel Holtmann2013-01-051-0/+16
|
* sdpd-request: Fix build errors due to unaligned memory accessSzymon Janc2012-12-111-2/+10
| | | | | | | | | | | | | | | | | This fix following compilation errors on ARM. CC src/bluetoothd-sdpd-request.o src/sdpd-request.c: In function ‘extract_des’: src/sdpd-request.c:186:17: error: cast increases required alignment of target type [-Werror=cast-align] src/sdpd-request.c:186:17: error: cast increases required alignment of target type [-Werror=cast-align] src/sdpd-request.c:210:17: error: cast increases required alignment of target type [-Werror=cast-align] src/sdpd-request.c:210:17: error: cast increases required alignment of target type [-Werror=cast-align] cc1: all warnings being treated as errors make[1]: *** [src/bluetoothd-sdpd-request.o] Error 1
* Revert "Ensure config.h is included by using CPPFLAGS"Johan Hedberg2012-12-071-0/+4
| | | | | | | | | | | | | | This reverts commit 8a03376544b046a84301847d1594f6c3674983ff. The patch needs to be split up and the gdbus/ changes were bogus compared to the original commit message. Conflicts: Makefile.am Makefile.obexd profiles/cyclingspeed/cyclingspeed.c profiles/heartrate/heartrate.c src/error.c
* Ensure config.h is included by using CPPFLAGSLucas De Marchi2012-12-051-4/+0
| | | | | | | | | | Instead of trying to include config.h in each file over the tree and possibly forgetting to include it, give a "-include config.h" argument to the compiler so it's guaranteed that a) it will be included for all source files and b) it will be the first header included. gdbus/ directory is left out, since it would break other projects using it.
* sdpd-request: Fix build errors due to unaligned memory accessSzymon Janc2012-09-051-29/+33
| | | | | | | | | This fix number of build errors on ARM similar to one below. CC src/bluetooth-sdpd-request.o src/sdpd-request.c: In function extra_des: src/sdpd-request.c:181:5: error: cast increases required alignment of targettype [-Werror=cast-align]
* sdp/build: Build fails when SDP_DEBUG enabledArek Lichwa2012-05-231-1/+1
| | | | Enabling SDP_DEBUG prevents build to be done.
* sdpd-request: Fix passing zero instead of NULLSyam Sidhardhan2012-04-131-1/+1
|
* Fix common misspelled wordsLucas De Marchi2011-07-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Accounting of misspelled words, as detected by codespell: acording 2 ancilliary 1 appropiate 1 atribute 1 cant 1 comming 2 gracefull 1 lenght 1 mispelled 1 occured 1 occurences 1 ocurred 3 prefered 1 presense 1 reponse 1 seperate 1 succesful 1 successully 1 sucessfull 1 sucessfully 1
* Fix unused variable warnings reported by GCC 4.6Johan Hedberg2011-05-151-2/+2
|
* Fix dead increments and assignments in sdp codeSzymon Janc2011-05-151-1/+0
|
* Fix C++ style commentsSzymon Janc2011-05-101-9/+9
|
* Remove not needed cast in sdp_set_cstate_pduSzymon Janc2011-05-101-2/+2
|
* Remove not needed data_left intialization in service_search_attr_reqSzymon Janc2011-05-101-1/+1
|
* Remove duplicated NULL check and debug messageSzymon Janc2011-03-041-6/+2
|
* Revert "Send an Invalid PDU Size Error Response for Service Search Req"Johan Hedberg2011-01-171-1/+1
| | | | | | | | | This reverts commit 3094ec7008735c80d35bd255ffc41e7bea2d3a3c. Commit 3094ec7008735c80d35bd255ffc41e7bea2d3a3c was supposed to fix TP/SERVER/SS/BI-01-C but it turns out it doesn't even affect the outcome of that test case (the code path is never traversed). Additionally the commit breaks TP/SERVER/SS/BI-02-C so it should be reverted.
* sdpd header cleanupClaudio Takahasi2010-11-251-1/+11
|
* Get rid of redundant type casts from SDP codeJohan Hedberg2010-10-271-3/+3
|
* Send Invalid Syntax Error if Resp Size Less Than 0x07Angela Bartholomaus2010-08-251-0/+9
| | | | Byte cnt range min 0x07 per Core v2.1, sec 4.61 for TP/SERVER/SA/BI-02-C
* Send an Invalid PDU Size Error Resp for Service Attr Search ReqAngela Bartholomaus2010-08-251-1/+1
| | | | Send error code 0x04 per CoreSpecv2.1, sec 4.4 for TP/SERVER/SSA/BI-02-C
* Send an Invalid PDU Size Error Response for Service Attr ReqAngela Bartholomaus2010-08-251-1/+1
| | | | Send error code 0x04 per CoreSpecv2.1, sec 4.4 for TP/SERVER/SA/BI-03-C
* Send an Invalid PDU Size Error Response for Service Search ReqAngela Bartholomaus2010-08-251-1/+1
| | | | Send error code 0x04 per CoreSpecv2.1, sec 4.4 for TP/SERVER/SS/BI-01-C
* Fix redundant null check on calling free()Gustavo F. Padovan2010-06-081-8/+4
| | | | Issues found by smatch static check: http://smatch.sourceforge.net/
* Move logging.{c,h} to log.{c,h}Gustavo F. Padovan2010-05-211-1/+1
| | | | Try to make log stuff more similar to ConnMan and oFono.
* Remove extra spaces from sdpd-request.cJose Antonio Santos Cadenas2010-05-071-9/+9
|
* Check the return of getsockopt and getsockname logging the errorsLuiz Augusto Von Dentz2010-03-241-4/+17
|
* Update copyright informationMarcel Holtmann2010-01-011-1/+1
|
* Fix AttributeIdList parsingJohan Hedberg2009-03-261-31/+63
| | | | | | | | | | | | | | The attribute ID list can have a mix of uint16 elements (a single attribute id) and uint32 elements (a range of attribute id's). The extract_des function was created with the assumption that lists passed to it always contain only one data type so extracting the attribute id list with it hasn't been possible. Before commit 02cd65fff0eac590c55968509c9023b691c69245 the SDP code would access invalid memory in the case of attribute id lists with mixed data types and after that commit the code would return a "invalid syntax" error to the SDP client (which is also not good). This patch adds a new struct to describe an element of this list so that the extract_attrs function is able to correctly parse each element.
* Make use of size_t and ssize_t when possibleJohan Hedberg2009-03-121-3/+3
|
* Always remember to free the extract_des internal listJohan Hedberg2009-02-261-7/+11
| | | | | The pSeq list needs to be fully free'd when extract_des returns an error.
* Require all parsed elements in extract_des to be of the same typeJohan Hedberg2009-02-261-2/+6
| | | | | | The extract_des function returns just one element type to the caller so if there are mixed elements it'll be impossible for the caller to know how to handle the returned list.
* Fix SDP data buffer parsingJohan Hedberg2009-02-261-28/+94
| | | | | This patch adds extra checks to make sure we never read past the end of the buffer.
* Minor whitespace fixesJohan Hedberg2009-02-241-1/+1
|
* Fix mostly every warning caused by -Wsign-compareMarcel Holtmann2009-01-291-6/+7
|
* Fix memory leakJohan Hedberg2009-01-161-1/+3
|
* Bail out from extract_des if sdp_uuid_extract failsJohan Hedberg2009-01-161-5/+5
|
* Update copyright informationMarcel Holtmann2009-01-011-1/+1
|
* Add braces around debug statementsMarcel Holtmann2008-12-231-2/+3
|
* Use tabs instead of whitespacesMarcel Holtmann2008-12-201-1/+1
|
* Fix build error when SDP_DEBUG is enabledClaudio Takahasi2008-10-141-2/+2
|