BLE 패스키 인증 전 NUS 명령 실행 방지 - 사이버 보안 대응(1차 NUS TX 차단, APP Timeout)

- GAP 연결 시점(페어링 전)에 인증 상태 플래그(ble_connection_st)가 조기 활성화되어, 패스키를 입력하지 않아도 NUS 명령, 응답 경로가 열림- BLE_GAP_EVT_CONNECTED에서 인증 상태 플래그 활성화 삭제- PM_EVT_CONN_SEC_SUCCEEDED(MITM)에서 인증 상태 플래그 활성화(기존에도 있어서 이중 활성화였음)
This commit is contained in:
2026-05-19 16:29:45 +09:00
parent 7ffb01e16e
commit a752d14399
@@ -635,6 +635,16 @@ static void nus_data_handler(ble_nus_evt_t * p_evt)
}
}
#if FEATURE_SECURE_CONNECTION && !BLE_DEV_MODE
if (ble_connection_st != BLE_CONNECTED_ST)
{
return; /* Not authenticated: do not buffer command */
}
#endif
cmd_type_t = CMD_BLE;
ble_got_new_data = true;
/* Only copy in callback; process in main loop */
if (p_evt->params.rx_data.length <= BLE_NUS_MAX_DATA_LEN)
{