You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2021/07/20 08:47:10 UTC

[GitHub] [mynewt-nimble] KKopyscinski opened a new pull request #1002: host/l2cap: disconnect channel if received more than expected

KKopyscinski opened a new pull request #1002:
URL: https://github.com/apache/mynewt-nimble/pull/1002


   If receive data lenght exceeds what was defined in first packet
   disconnect with peer.
   
   This is affecting L2CAP/LE/CFC/BV-28-C


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #1002: host/l2cap: disconnect channel if received more than expected

Posted by GitBox <gi...@apache.org>.
rymanluk commented on a change in pull request #1002:
URL: https://github.com/apache/mynewt-nimble/pull/1002#discussion_r673835204



##########
File path: nimble/host/src/ble_l2cap_coc.c
##########
@@ -255,6 +255,11 @@ ble_l2cap_coc_rx_fn(struct ble_l2cap_chan *chan)
         return 0;
     }
 
+    if (OS_MBUF_PKTLEN(rx->sdu) > rx->data_offset) {

Review comment:
       This seems to be too late.
   I think we should add checks somewhere around line 201 and in case of fragmentation we should add additional checks  around 229.
   
   In addition, when we decide to disconnect, we probably need to clear already received data.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] KKopyscinski merged pull request #1002: host/l2cap: disconnect channel if received more than expected

Posted by GitBox <gi...@apache.org>.
KKopyscinski merged pull request #1002:
URL: https://github.com/apache/mynewt-nimble/pull/1002


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org