From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] sim: validate IMS private identity
Date: Fri, 15 Jan 2021 13:52:38 -0600 [thread overview]
Message-ID: <5b0f5413-12b7-8472-74f7-3562c8165603@gmail.com> (raw)
In-Reply-To: <YAHrmTm8g3uptY8j@curiosity>
[-- Attachment #1: Type: text/plain, Size: 1378 bytes --]
Hi Sergey,
>>> This field may not be defined for ISIM in use. In this case the
>>> field still can be read from ISIM, though it will not contain
>>> a valid UTF8 string. For instance, it may contain 255 0xFF bytes.
>>
>> Ugh, seems like the SIM vendor can't follow RFC's either? 31.103 Section
>> 4.2.2 says:
>>
>> "For contents and syntax of NAI TLV data object values see IETF RFC 2486
>> [24]. The NAI shall be encoded to an octet string according to UTF-8
>> encoding rules as specified in IETF RFC 3629 [27]. The tag value of the NAI
>> TLV data object shall be '80'. "
>
> This crash occured during my experiments with eSIM. As I mentioned, the
> content of that TLV data object was 0xff bytes. IIUC it looks like vendor
> could just skip initialization of that particular TLV data object during
> bootstrap. Though I am not yet familiar with eSIM init procedure...
>
I figured. The likely reason for this is that SIM strings are generally encoded
in another format. If you're interested, see src/util.c sim_string_to_utf8().
0xff is used as padding in such cases and thus a field with only 0xffs is
treated as empty.
However, the above would seem not to apply to EFimpi and a few others that 3GPP
wants encoded as a utf-8 string. So, likely, a bug on the SIM, but we should
have sanitized the contents better.
Regards,
-Denis
prev parent reply other threads:[~2021-01-15 19:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-15 16:38 [PATCH] sim: validate IMS private identity Sergey Matyukevich
2021-01-15 18:07 ` Denis Kenzior
2021-01-15 19:23 ` Sergey Matyukevich
2021-01-15 19:52 ` Denis Kenzior [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5b0f5413-12b7-8472-74f7-3562c8165603@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).