Skip to content

Fixes for the modem simulator#2899

Open
llfhdskf wants to merge 5 commits into
google:mainfrom
llfhdskf:vuln-fixes
Open

Fixes for the modem simulator#2899
llfhdskf wants to merge 5 commits into
google:mainfrom
llfhdskf:vuln-fixes

Conversation

@llfhdskf

Copy link
Copy Markdown

No description provided.

@Databean Databean added the kokoro:run Run e2e tests. label Jul 24, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Jul 24, 2026
Comment thread base/cvd/cuttlefish/host/commands/modem_simulator/modem_service.cpp Outdated
Roman Kiryanov added 5 commits July 24, 2026 20:26
std::string::compare

> The overloads taking parameters named pos1 or pos2
> throws std::out_of_range if the argument is out of range.

Bug: 509614113
Signed-off-by: Roman Kiryanov <rkir@google.com>
std::stoi:

> std::invalid_argument if no conversion could be performed.
> std::out_of_range if the converted value would fall out of the range

Bug: 509614113
Signed-off-by: Roman Kiryanov <rkir@google.com>
…nated

If the `Read` call fills the whole buffer,
`commands.append(buffer.data())` with no zero
characters will read past the buffer. If the
`Read` produces data with zero characters in
the middle, it will cause a loss of data.

Bug: 509614113
Signed-off-by: Roman Kiryanov <rkir@google.com>
The `sms_pdu` is used in an async callback,
potentially after the control leaves the scope.

Bug: 509614113
Signed-off-by: Roman Kiryanov <rkir@google.com>
* The code used to erase elements from the `clients_` and
  `remote_clients_` while iterating over them in `MonitorLoop`.

* `SetRemoteClient` is called from two threads
  (main.cpp and `CallService::HandleDial`), so it
  needs a mutex.

* `CallService::HandleRemoteCall` can also be called
  from two threads (host-guest and guest-host calls),
  so `CallService` also needs a mutex.

Bug: 509614113
Signed-off-by: Roman Kiryanov <rkir@google.com>
@ser-io ser-io added the kokoro:run Run e2e tests. label Jul 24, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Jul 24, 2026
@ser-io
ser-io enabled auto-merge July 24, 2026 20:46
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

Successfully merging this pull request may close these issues.

4 participants