Headline
CVE-2022-23625: fix: remove sensitive info SQCORE-1246 (#241) · wireapp/wire-ios-transport@02e90aa
Wire-ios is a messaging application using the wire protocol on apple’s ios platform. In versions prior to 3.95 malformed resource identifiers may render the iOS Wire Client completely unusable by causing it to repeatedly crash on launch. These malformed resource identifiers can be generated and sent between Wire users. The root cause lies in wireapp/wire-ios-transport, where code responsible for removing sensible tokens before logging may fail and lead to a crash (Swift exception) of the application. This causes undesirable behavior, however the (greater) Wire system is still functional. Users are advised to upgrade as soon as possible. There are no known workarounds for this issue.
@@ -1030,4 +1030,78 @@ - (void)testPrivateDescriptionWithUUID XCTAssertTrue([privateDescription rangeOfString:clientID].location == NSNotFound); }
- (void)testPrivateDescriptionWithEmoji { // given NSString *clientID = @"608b4f25ba2b193"; NSString *uuid = @"9e86b08a-8de7-11e9-810f-22000a62954d"; NSString *path = [NSString stringWithFormat:@"with/%@/🤨/%@/emoji", clientID, uuid]; ZMTransportRequest *request = [ZMTransportRequest requestWithPath:path method:ZMMethodHEAD payload:nil];
// when NSString *privateDescription = [request safeForLoggingDescription];
// then XCTAssertTrue([privateDescription rangeOfString:@"with/"].location != NSNotFound); XCTAssertTrue([privateDescription rangeOfString:@"/emoji"].location != NSNotFound); XCTAssertTrue([privateDescription rangeOfString:@"/🤨/"].location != NSNotFound); XCTAssertTrue([privateDescription rangeOfString:uuid].location == NSNotFound); XCTAssertTrue([privateDescription rangeOfString:clientID].location == NSNotFound); }
- (void)testPrivateDescriptionWithOverlappedIDs { // given NSString *clientID = @"608b4f25ba2b193"; NSString *uuid = @"9e86b08a-8de7-11e9-810f-22000a62954d"; NSString *path = [NSString stringWithFormat:@"ids/%@%@/overlapped", clientID, uuid]; ZMTransportRequest *request = [ZMTransportRequest requestWithPath:path method:ZMMethodHEAD payload:nil];
// when NSString *privateDescription = [request safeForLoggingDescription];
// then XCTAssertTrue([privateDescription rangeOfString:@"ids/"].location != NSNotFound); XCTAssertTrue([privateDescription rangeOfString:@"/overlapped"].location != NSNotFound); XCTAssertTrue([privateDescription rangeOfString:uuid].location == NSNotFound); XCTAssertTrue([privateDescription rangeOfString:clientID].location == NSNotFound);
// given path = [NSString stringWithFormat:@"ids/%@%@/overlapped", uuid, clientID]; request = [ZMTransportRequest requestWithPath:path method:ZMMethodHEAD payload:nil];
// when privateDescription = [request safeForLoggingDescription];
// then XCTAssertTrue([privateDescription rangeOfString:@"ids/"].location != NSNotFound); XCTAssertTrue([privateDescription rangeOfString:@"/overlapped"].location != NSNotFound); XCTAssertTrue([privateDescription rangeOfString:uuid].location == NSNotFound); XCTAssertTrue([privateDescription rangeOfString:clientID].location == NSNotFound);
// given path = [NSString stringWithFormat:@"ids/%@%@/overlapped", uuid, uuid]; request = [ZMTransportRequest requestWithPath:path method:ZMMethodHEAD payload:nil];
// when privateDescription = [request safeForLoggingDescription];
// then XCTAssertTrue([privateDescription rangeOfString:@"ids/"].location != NSNotFound); XCTAssertTrue([privateDescription rangeOfString:@"/overlapped"].location != NSNotFound); XCTAssertTrue([privateDescription rangeOfString:uuid].location == NSNotFound);
// given path = [NSString stringWithFormat:@"ids/%@%@/overlapped", clientID, clientID]; request = [ZMTransportRequest requestWithPath:path method:ZMMethodHEAD payload:nil];
// when privateDescription = [request safeForLoggingDescription];
// then XCTAssertTrue([privateDescription rangeOfString:@"ids/"].location != NSNotFound); XCTAssertTrue([privateDescription rangeOfString:@"/overlapped"].location != NSNotFound); XCTAssertTrue([privateDescription rangeOfString:clientID].location == NSNotFound); }
@end