fix(towercore): reject duplicate read selectors

- Block the repeated 0x0b TLV parser differential used to authorize one UE and read another.
This commit is contained in:
TakuyaYagam1 committed 2026-11-29 15:26:21 +03:00
1 parent ea9f241058
commit cf54fcd6db
2 files changed
+23 -4

No files matched your search

+13
View File
@@ -19,6 +19,19 @@ class GuardTests(unittest.TestCase):
request = frame(0x23, [(0x0B, b"victim01"), (0x0B, b"victim02")])
self.assertTrue(module.should_block(request))
def test_blocks_duplicate_subscriber_override_on_read(self) -> None:
module = importlib.import_module("guard")
request = frame(
0x21,
[
(0x0B, b"owned-ue"),
(0x0B, b"victimue"),
(0x0D, b"\x01\0\0\0"),
(0x0E, b"\xff\xff\xff\xff"),
],
)
self.assertTrue(module.should_block(request))
def test_allows_checker_bulk_read_by_message_ids(self) -> None:
guard = importlib.util.find_spec("guard")
self.assertIsNotNone(guard, "Towercore guard is not implemented")