Message ID | 20230126203722.454754-2-cengiz.can@canonical.com |
---|---|
State | New |
Headers | show |
Series | CVE-2022-45934 | expand |
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 4df3d0ed6c80..6402edcacdcb 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -4453,7 +4453,8 @@ static inline int l2cap_config_req(struct l2cap_conn *conn, chan->ident = cmd->ident; l2cap_send_cmd(conn, cmd->ident, L2CAP_CONF_RSP, len, rsp); - chan->num_conf_rsp++; + if (chan->num_conf_rsp < L2CAP_CONF_MAX_CONF_RSP) + chan->num_conf_rsp++; /* Reset config buffer. */ chan->conf_len = 0;