Bluetooth: SDP: Fix possible out of bound memory access
Bluetooth: SDP: Fix possible out of bound memory access

buf->len should be validated before accessing it since remote can
send invalid frame_len which can result in out of bound memory
access.

This also fix the len check wrt cstate, since current check is
not considering the cstate length size and frame_len size.

Jira: ZEP-2110
Signed-off-by: Jaganath Kanakkassery <cdeedb43633a09d3dc68b67af94002f918d6c778@intel.com>

rsalveti/zephyr,fractalclone/zephyr-riscv,ldts/zephyr,ldts/zephyr,kraj/zephyr,aceofall/zephyr-iotos,GiulianoFranchetto/zephyr,aceofall/zephyr-iotos,kraj/zephyr,fbsder/zephyr,GiulianoFranchetto/zephyr,rsalveti/zephyr,holtmann/zephyr,Vudentz/zephyr,sharronliu/zephyr,explora26/zephyr,zephyriot/zephyr,nashif/zephyr,rsalveti/zephyr,holtmann/zephyr,mbolivar/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,fractalclone/zephyr-riscv,finikorg/zephyr,Vudentz/zephyr,runchip/zephyr-cc3220,runchip/zephyr-cc3220,nashif/zephyr,GiulianoFranchetto/zephyr,runchip/zephyr-cc3220,Vudentz/zephyr,ldts/zephyr,mbolivar/zephyr,fractalclone/zephyr-riscv,zephyriot/zephyr,ldts/zephyr,nashif/zephyr,punitvara/zephyr,punitvara/zephyr,zephyriot/zephyr,sharronliu/zephyr,zephyriot/zephyr,sharronliu/zephyr,mbolivar/zephyr,galak/zephyr,fbsder/zephyr,GiulianoFranchetto/zephyr,punitvara/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,GiulianoFranchetto/zephyr,Vudentz/zephyr,galak/zephyr,runchip/zephyr-cc3220,kraj/zephyr,galak/zephyr,galak/zephyr,fbsder/zephyr,finikorg/zephyr,rsalveti/zephyr,fbsder/zephyr,zephyriot/zephyr,explora26/zephyr,finikorg/zephyr,punitvara/zephyr,fractalclone/zephyr-riscv,runchip/zephyr-cc3220,rsalveti/zephyr,aceofall/zephyr-iotos,punitvara/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,fractalclone/zephyr-riscv,explora26/zephyr,fbsder/zephyr,mbolivar/zephyr,ldts/zephyr,zephyrproject-rtos/zephyr,aceofall/zephyr-iotos,kraj/zephyr,nashif/zephyr,galak/zephyr,holtmann/zephyr,holtmann/zephyr,aceofall/zephyr-iotos,holtmann/zephyr,sharronliu/zephyr,zephyrproject-rtos/zephyr,explora26/zephyr,explora26/zephyr,sharronliu/zephyr,finikorg/zephyr,kraj/zephyr,mbolivar/zephyr,Vudentz/zephyr