Code Monkey home page Code Monkey logo

Comments (13)

free5gc-org avatar free5gc-org commented on May 18, 2024

Thanks for the report. We'll check the bug.

from free5gc.

SaltySooda avatar SaltySooda commented on May 18, 2024

how's going about this issue?we get same problem

from free5gc.

chenhao5651 avatar chenhao5651 commented on May 18, 2024

how's going about this issue?we get same problem

Free5gc still have this problem. I've fixed this bug.

from free5gc.

SaltySooda avatar SaltySooda commented on May 18, 2024

could you share it to us

from free5gc.

chenhao5651 avatar chenhao5651 commented on May 18, 2024

could you share it to us
The main changes is in the HandleGenerateAuthData
generate_auth_data.zip

from free5gc.

SaltySooda avatar SaltySooda commented on May 18, 2024

udm crashed when i start the registration request(after replaced the "generate_auth_data.go")

INFO[2020-06-12T06:17:51Z]/src/udm/udm_producer/generate_auth_data.go:35 free5gc/src/udm/udm_producer.HandleGenerateAuthData() supi conversion => imsi-460070123456001 UDM=UEAU
https://127.0.0.1:29510
INFO[2020-06-12T06:17:51Z]/src/udm/udm_producer/generate_auth_data.go:98 free5gc/src/udm/udm_producer.HandleGenerateAuthData() HandleGenerateAuthData AUTS is =%!s(*models.ResynchronizationInfo=) UDM=UEAU
INFO[2020-06-12T06:17:51Z]/src/udm/udm_producer/generate_auth_data.go:186 free5gc/src/udm/udm_producer.HandleGenerateAuthData() K=1234567890abcdef1111111111111111
SQN=16f3b3f70fc2
OP=12345678901234561234567890123456
OPC= UDM=UEAU
INFO[2020-06-12T06:17:51Z]/src/udm/udm_producer/generate_auth_data.go:198 free5gc/src/udm/udm_producer.HandleGenerateAuthData() RAND=1d57925162bd4fe61d245311e613fc39
AMF=8000 UDM=UEAU
panic: runtime error: index out of range

goroutine 62 [running]:
free5gc/lib/milenage.milenageF1(0x12c85f0, 0x0, 0x0, 0xc00002b260, 0x10, 0x20, 0xc0002c0890, 0x10, 0x10, 0xc0002c0840, ...)
/root/go/src/free5gc/lib/milenage/milenage.go:60 +0x3fb
free5gc/lib/milenage.F1_Test(...)
/root/go/src/free5gc/lib/milenage/milenage.go:577
free5gc/src/udm/udm_producer.HandleGenerateAuthData(0xc0007d4000, 0xc00011248e, 0x1e, 0x0, 0x0, 0xc000296940, 0x20, 0x0, 0xc00012a030, 0x24)
/root/go/src/free5gc/src/udm/udm_producer/generate_auth_data.go:213 +0x17ad
free5gc/src/udm/udm_handler.Handle()
/root/go/src/free5gc/src/udm/udm_handler/handler.go:39 +0x5f4
created by free5gc/src/udm/udm_service.(*UDM).Start
/root/go/src/free5gc/src/udm/udm_service/udm_init.go:146 +0x57b
root@user:~/go/src/free5gc#

from free5gc.

adejavel avatar adejavel commented on May 18, 2024

Hello,
We had the same issue in our lab, which is due to two different issues that we have fixed:

  • The first one is that AUSF doesn't send resynchronisation informations received from AMF to UDM so UDM doesn't try to resynchronize... To fix this issue, we added the following line in file src/ausf/producer/ue_authentication.go after line 187 : authInfoReq.ResynchronizationInfo = body.ResynchronizationInfo
  • The second issue is that resynchronization is not implemented by free5gc UDM currently... We first replaced the file src/udm/producer/generate_auth_data.go by the the file provided by @chenhao5651 . The file is great but not implementing well the resynchronization procedure as the UE should not send back RAND but only AUTS so UDM has to find itself the RAND used to generate previous authentication vectors. So the code provided doesn't work with commercial equipments. The UDM should retrieve RAND from database. We didn't implemented this but we made a workaround with a hard coded RAND. In the file provided by @chenhao5651 , comment line 191, copy line 195 and paste it above line 99. Then change line 103 from RAND_ms,_ := hex.DecodeString(RAND_ms_str) to RAND_ms := RAND

This makes resynchronization procedure working but it is still a workaround !

from free5gc.

SaltySooda avatar SaltySooda commented on May 18, 2024

@adejavel

we have fix the plan offered by@chenhao5651
1.replace “generate_auth_data.go” (we do a few change)
2.Add following line in ausf/ausf_producer/UEAuthentication.HandleUeAuthPostRequest:
if body.ResynchronizationInfo != nil {authInfoReq.ResynchronizationInfo = body.ResynchronizationInfo}
(same with @adejavel
3.Add following line in amf/gmm/gmm_handler/handler.HandleAuthenticationFailure(after line 2067):
var av5gAka models.Av5gAka
if err := mapstructure.Decode(ue.AuthenticationCtx.Var5gAuthData,&av5gAka);err != nil {return fmt.Errorf("Var5gAuthData Convert Type Error")}
auts := authenticationFailure.AuthenticationFailureParameter.GetAuthenticationFailureParameter()
resynchronizationInfo := &models.ResynchronizationInfo{Rand:av5gAka.Rand,Auts: hex.EncodeToString(auts[:]),}

from free5gc.

SaltySooda avatar SaltySooda commented on May 18, 2024

generate_auth_data.zip

from free5gc.

free5gc-org avatar free5gc-org commented on May 18, 2024

Seems still happened

from free5gc.

adejavel avatar adejavel commented on May 18, 2024

Hello,
We tested the fix proposed by @359859461 and it is working well ! thanks

PS: ce code proposed by @359859461 is from an older version of the UDM... It is fixing the current issue but I had some other issues with OP length (reported in another issue) but this has been fixed in the latest version of the code. So the code proposed by @359859461 has to be merged with the current version of the code !

from free5gc.

free5gc-org avatar free5gc-org commented on May 18, 2024

This issue has been mentioned on free5GC. There might be relevant details there:

https://forum.free5gc.org/t/does-free5gc-support-real-gnb-and-5g-ue/176/2

from free5gc.

free5gc-org avatar free5gc-org commented on May 18, 2024

Hello everyone,
in v3.0.4 we add a test with resynchronization process (./test.sh TestReSynchronisation)
and we think this bug has been fixed in v3.0.4
You can upgrade free5gc to the latest version and test if this problem is still exist

from free5gc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.