Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with encryption #18

Open
shaaati opened this issue Jan 8, 2016 · 0 comments
Open

Problem with encryption #18

shaaati opened this issue Jan 8, 2016 · 0 comments

Comments

@shaaati
Copy link

shaaati commented Jan 8, 2016

When trying to set up encryption I end up with the following log output:

Jan  8 10:58:25 openBTS openbts: DEBUG 1785:2042 2016-01-08T10:58:25.8 TMSITable.cpp:161:runQuery:  query=UPDATE TMSI_TABLE SET IMEI='359710049084380',A5_SUPPORT=5,POWER_CLASS=4,kc='96E743AD6398DC00',ASSOCIATED_URI='<tel:017694923917>',ASSERTED_IDENTITY='',ACCESSED=1452247105 WHERE IMSI='262071234567891' checkChanges=1
Jan  8 10:58:25 openBTS openbts: ERR 1785:2042 2016-01-08T10:58:25.8 TMSITable.cpp:165:runQuery: TMSI table query failed: query=UPDATE TMSI_TABLE SET IMEI='359710049084380',A5_SUPPORT=5,POWER_CLASS=4,kc='96E743AD6398DC00',ASSOCIATED_URI='<tel:017694923917>',ASSERTED_IDENTITY='',ACCESSED=1452247105 WHERE IMSI='262071234567891' resultCode=101 changes=0 error:not an error
Jan  8 10:58:25 openBTS openbts: ERR 1785:2042 2016-01-08T10:58:25.8 TMSITable.cpp:999:getKc: sqlite3_single_lookup failed to find kc for 262071234567891
Jan  8 10:58:25 openBTS openbts: DEBUG 1785:2042 2016-01-08T10:58:25.8 L3MobilityManagement.cpp:829:machineRunState: no ki: NOT sending Ciphering Mode Command on C0T0 SDCCH/4-0 state=Established for IMSI262071234567891
Jan  8 10:58:25 openBTS openbts: DEBUG 1785:2042 2016-01-08T10:58:25.8 TMSITable.cpp:161:runQuery:  query=INSERT INTO TMSI_TABLE (IMSI,CREATED,ACCESSED,TMSI,AUTH,REJECT_CODE,OLD_MCC,OLD_MNC,OLD_LAC,OLD_TMSI) VALUES ('262071234567891',1452247105,1452247105,1073741827,1,0,262,7,1000,0) checkChanges=1

Apparently, a key kc is created as expected but then the update query fails. I am a bit irritated by the sqlite error message (error:not an error), however if this code path is executed the runQuery() method will inevitably return false. As a result no encryption is set up.

(When looking at the database file in /var/run/TMSITable.db I can indeed not see the key kc, but I don't yet fully understand if the database I see is up-to-date or if there is a more recent version in memory that still needs to be flushed to disk.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant