
CVE-2026-22012のPythonシミュレーション。Diameter Credit-ControlにおけるFinal-Unit-Indicationの欠落により、5Gネットワークで無制限のクォータとサービス迂回が可能になる仕組みを示しています。
# diameter_credit_control_sim.py - Simulated OCS with missing final-unit indication
class OCS:
def process_CCR(self, request):
# Vulnerability: always returns SUCCESS with same quota, never sends final-unit
return {'Result-Code': 2001, 'Granted-Service-Unit': {'CC-Total-Octets': 5000}}
class Client:
def send_CCR(self):
response = ocs.process_CCR({'type': 'INITIAL'})
print(f"Received quota: {response['Granted-Service-Unit']}")
ocs = OCS()
client = Client()
client.send_CCR()
Diameter Credit‑Controlアプリケーションは、加入者の残高が尽きたときにFinal-Unit-Indication AVPを送信しません。クライアントはクレジットを差し引かずにサービスを提供し続けるため、無制限の無料利用が可能になります。
シミュレーションを実行します:
python diameter_credit_control_sim.py
クライアントは無期限に新しいクォータを受け取り続けます。