Change in simtrace2[master]: remsim: fix payload overwriting

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Jul 30 13:34:54 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10218 )

Change subject: remsim: fix payload overwriting
......................................................................

remsim: fix payload overwriting

The slot number is in the header, and correctly set in st_push_hdr.
Setting the slot in st_slot_tx_msg will overwrite the payload data.
This caused bytes three of the ATR to be changed from 0x96 to 0x00,
corrupting the ATR. This corruption is caught by the ATR checksum,
and the modem would reset the card (2 additional times) to try to
get correct ATR.

Change-Id: If971699993617fc50557d20582c344ea06645a3f
---
M host/simtrace2-remsim.c
1 file changed, 0 insertions(+), 5 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/host/simtrace2-remsim.c b/host/simtrace2-remsim.c
index 462f73e..52c5051 100644
--- a/host/simtrace2-remsim.c
+++ b/host/simtrace2-remsim.c
@@ -173,16 +173,11 @@
 int st_slot_tx_msg(struct st_slot *slot, struct msgb *msg,
 		   uint8_t msg_class, uint8_t msg_type)
 {
-	struct simtrace_msg_hdr *sh = (struct simtrace_msg_hdr *) msg->data;
-
-	sh->slot_nr = slot->slot_nr;
-
 	st_push_hdr(msg, msg_class, msg_type, slot->slot_nr);
 
 	return st_transp_tx_msg(slot->transp, msg);
 }
 
-
 /***********************************************************************
  * Card Emulation protocol
  ***********************************************************************/

-- 
To view, visit https://gerrit.osmocom.org/10218
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If971699993617fc50557d20582c344ea06645a3f
Gerrit-Change-Number: 10218
Gerrit-PatchSet: 4
Gerrit-Owner: Kévin Redon <kredon at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Kévin Redon <kredon at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180730/abe0f38c/attachment.htm>


More information about the gerrit-log mailing list