diff options
author | Andreas.Eversberg <jolly@eversberg.eu> | 2010-08-29 11:05:07 +0000 |
---|---|---|
committer | Andreas.Eversberg <jolly@eversberg.eu> | 2010-08-29 11:05:07 +0000 |
commit | 0d9a3b91c1b0b3d14f7ba60e159768e9feeb7e32 (patch) | |
tree | 77789554be7ea789c8e7eafbc9ce4d5ea062053b /src/host/layer23/src/mobile/subscriber.c | |
parent | 3b8338b9c0df117e157350e15698e8db9ff2e505 (diff) |
[layer23] Fixed security issue
Authentication must not be performed using SIM client, if different IMSI is
used, to protect identity of caller.
Diffstat (limited to 'src/host/layer23/src/mobile/subscriber.c')
-rw-r--r-- | src/host/layer23/src/mobile/subscriber.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/host/layer23/src/mobile/subscriber.c b/src/host/layer23/src/mobile/subscriber.c index 9f791c86..b674860d 100644 --- a/src/host/layer23/src/mobile/subscriber.c +++ b/src/host/layer23/src/mobile/subscriber.c @@ -769,17 +769,18 @@ static void subscr_sim_update_cb(struct osmocom_ms *ms, struct msgb *msg) } int gsm_subscr_generate_kc(struct osmocom_ms *ms, uint8_t key_seq, - uint8_t *rand) + uint8_t *rand, uint8_t no_sim) { struct gsm_subscriber *subscr = &ms->subscr; struct msgb *nmsg; struct sim_hdr *nsh; /* not a SIM */ - if (subscr->sim_type != GSM_SIM_TYPE_READER || !subscr->sim_valid) { + if (subscr->sim_type != GSM_SIM_TYPE_READER || !subscr->sim_valid + || no_sim) { struct gsm48_mm_event *nmme; - LOGP(DMM, LOGL_INFO, "Sending fake authentication response\n"); + LOGP(DMM, LOGL_INFO, "Sending dummy authentication response\n"); nmsg = gsm48_mmevent_msgb_alloc(GSM48_MM_EVENT_AUTH_RESPONSE); if (!nmsg) return -ENOMEM; |