Profile and optimize your game's memory

RSS for tag

Discuss the WWDC22 Session Profile and optimize your game's memory

Posts under wwdc2022-10106 tag

4 Posts

Post

Replies

Boosts

Views

Activity

Purchange is complete but show pending in account.
Hello I have buy new developepr membership and i have get email for purchase confirmation but when ihave go to developer account i have seen this. Purchase your membership. To continue your enrollment, complete your purchase now. Your purchase may take up to 48 hours to process. Please help me why it will show this if i have already buy the membership and i itune i have check and see the member is active and valid for 1 year. Please help me to solve this issue.
3
0
2.2k
Apr ’26
Help with the (Unsafe) pointer management
Hello, i need an help in programming. I am facing to a library that has to be used with mex in matlab, and i did in a good way the matrix product in the GPU ( C = A dot B)  Now i need the data stored in the MPSMatrix C, not in a plain way but in a way i can use in c (const float**). So i used in Swift: let outBuffer = C.data.contents() And now i need an object that should be <UnsafeMutablePointer<UnsafeMutablePointer> structured this way: [c11 c12 ... c1n] ....         ..... [cn1 ....    cnn] Can you help me to implement this? Thank you so much.
1
0
1.1k
Nov ’22
Sensitive Information Disclosed on the Application Memory
Hi Team, The user token/passwords and details are still available in memory after submission in my IOS mobile application. This allows for an attacker with physical access to the user's system to access the memory and steal the credentials. I was able to extract the user details with fridump. https://github.com/rootbsd/fridump3 The clear text details in the memory should be reset after computing the hash on the login function. A simple recommendation there is: It's recommended to clear sensitive values and set as the null values from application memory after they are used. Also, it's recommended to not store sensitive values (such as password) as plain text values, as a mitigation hash/XOR function can be used. Technically it makes sense (at least from my experience using other languages such as C / C++ / C# / Objective-C / Java etc..). However, apparently Swift has some strange runtime mechanism of caching strings in memory. Meaning that even if you remove the content or modify a string in memory, its content will still be cached somewhere in memory, either as leftovers or copies (see images below). I’m familiar with the concept of automatic reference counting in ObjC and Swift, but for Swift specifically it seems to be more than that. In Objective-C and C in general, I never had this issue, because it’s allowed to have more control from the developer perspective, such as writing C code in Objective-C (e.g. calling memset on a heap allocated string). Reading some threads: https://developer.apple.com/forums/thread/106405 https://developer.apple.com/forums/thread/44121 https://developer.apple.com/forums/thread/4879 https://stackoverflow.com/questions/60702113/how-to-remove-the-string-from-the-memory-for-security-reasons-in-ios-is-it-even/ The last comment there by eskimo from the 2nd thread is the same thought process I had. Eventually a Text Field requesting you to enter a password will return a copy. Even if we use Unsafe Swift features, eventually a Text Field will return a copy of a string from a safe context. I was thinking even creating a custom UI control where it will override some of the text change events and store them on a static buffer where each character is XORed, meaning that even if we get the text from the custom UI control somewhere in the consumer code, it will return a copy, but an encrypted XORed string of the user’s password. So, what's your thoughst? What's the solutions ?
4
1
3.5k
Nov ’22
VM: Accounts framework use lots of memory
Hi, I have a endpoint security process on macOS 11.4 and it cost 900+M memory. I get the memory graph and find Accounts framework alloc many memory   Dirty      Clean  Reclaimable    Regions    Category     ---        ---          ---        ---    ---  925 MB        0 B          0 B      14012    Accounts framework Some traceTrees are like these:     3 VM: Accounts framework  0x130e78000-0x130e89000 [V=68K] r--/r--         3 Region Accounts framework  region + 0 0x121ff0000         2 0x7fcc3d023a00 [1536]  +1341:  0x7fcc3d023f3d --> offset 65536         + 1 Region __DATA_DIRTY /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation __DATA_DIRTY __data: '__CFRuntimeClassTable' + 2224 0x7fff80292090         + 1 Region __DATA_DIRTY /System/Library/Frameworks/Security.framework/Versions/A/Security __DATA_DIRTY __bss: 'Security::KeychainCore::gTypes()::nexus' 0x7fff803182a0         1 0x7fcc3be10650 [784]   +477:  0x7fcc3be1082d --> offset 65663           1 <icu::SharedDateFormatSymbols 0x7fcc3d02c000> [1536]   +128:  0x7fcc3d02c080 --> offset 8             1 0x7fcc3c813200 [3072]  +2480:  0x7fcc3c813bb0               1 0x7fcc3bf056a0 [80]     +0:  0x7fcc3bf056a0                 1 <icu::UnifiedCache 0x7fcc3bf05660> [64]     +8:  0x7fcc3bf05668                   1 Region __DATA_DIRTY /usr/lib/libicucore.A.dylib __DATA_DIRTY __bss + 3552 0x7fff8081cf30     2 VM: Accounts framework  0x112bb2000-0x112bc3000 [V=68K] r--/r--         2 Region Accounts framework  region + 0 0x110ff0000         2 0x7fcc3be06ea0 [432]   +197:  0x7fcc3be06f65 --> offset 65663           1 Region __DATA_DIRTY /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation __DATA_DIRTY __data: '__CFRuntimeClassTable' + 2176 0x7fff80292060           1 Region __DATA_DIRTY /System/Library/Frameworks/Security.framework/Versions/A/Security __DATA_DIRTY __bss: 'Security::CodeSigning::gCFObjects' 0x7fff803180d8 Is this a system bug? And what is VM: Accounts framework?
4
0
1.3k
Aug ’22
Purchange is complete but show pending in account.
Hello I have buy new developepr membership and i have get email for purchase confirmation but when ihave go to developer account i have seen this. Purchase your membership. To continue your enrollment, complete your purchase now. Your purchase may take up to 48 hours to process. Please help me why it will show this if i have already buy the membership and i itune i have check and see the member is active and valid for 1 year. Please help me to solve this issue.
Replies
3
Boosts
0
Views
2.2k
Activity
Apr ’26
Help with the (Unsafe) pointer management
Hello, i need an help in programming. I am facing to a library that has to be used with mex in matlab, and i did in a good way the matrix product in the GPU ( C = A dot B)  Now i need the data stored in the MPSMatrix C, not in a plain way but in a way i can use in c (const float**). So i used in Swift: let outBuffer = C.data.contents() And now i need an object that should be <UnsafeMutablePointer<UnsafeMutablePointer> structured this way: [c11 c12 ... c1n] ....         ..... [cn1 ....    cnn] Can you help me to implement this? Thank you so much.
Replies
1
Boosts
0
Views
1.1k
Activity
Nov ’22
Sensitive Information Disclosed on the Application Memory
Hi Team, The user token/passwords and details are still available in memory after submission in my IOS mobile application. This allows for an attacker with physical access to the user's system to access the memory and steal the credentials. I was able to extract the user details with fridump. https://github.com/rootbsd/fridump3 The clear text details in the memory should be reset after computing the hash on the login function. A simple recommendation there is: It's recommended to clear sensitive values and set as the null values from application memory after they are used. Also, it's recommended to not store sensitive values (such as password) as plain text values, as a mitigation hash/XOR function can be used. Technically it makes sense (at least from my experience using other languages such as C / C++ / C# / Objective-C / Java etc..). However, apparently Swift has some strange runtime mechanism of caching strings in memory. Meaning that even if you remove the content or modify a string in memory, its content will still be cached somewhere in memory, either as leftovers or copies (see images below). I’m familiar with the concept of automatic reference counting in ObjC and Swift, but for Swift specifically it seems to be more than that. In Objective-C and C in general, I never had this issue, because it’s allowed to have more control from the developer perspective, such as writing C code in Objective-C (e.g. calling memset on a heap allocated string). Reading some threads: https://developer.apple.com/forums/thread/106405 https://developer.apple.com/forums/thread/44121 https://developer.apple.com/forums/thread/4879 https://stackoverflow.com/questions/60702113/how-to-remove-the-string-from-the-memory-for-security-reasons-in-ios-is-it-even/ The last comment there by eskimo from the 2nd thread is the same thought process I had. Eventually a Text Field requesting you to enter a password will return a copy. Even if we use Unsafe Swift features, eventually a Text Field will return a copy of a string from a safe context. I was thinking even creating a custom UI control where it will override some of the text change events and store them on a static buffer where each character is XORed, meaning that even if we get the text from the custom UI control somewhere in the consumer code, it will return a copy, but an encrypted XORed string of the user’s password. So, what's your thoughst? What's the solutions ?
Replies
4
Boosts
1
Views
3.5k
Activity
Nov ’22
VM: Accounts framework use lots of memory
Hi, I have a endpoint security process on macOS 11.4 and it cost 900+M memory. I get the memory graph and find Accounts framework alloc many memory   Dirty      Clean  Reclaimable    Regions    Category     ---        ---          ---        ---    ---  925 MB        0 B          0 B      14012    Accounts framework Some traceTrees are like these:     3 VM: Accounts framework  0x130e78000-0x130e89000 [V=68K] r--/r--         3 Region Accounts framework  region + 0 0x121ff0000         2 0x7fcc3d023a00 [1536]  +1341:  0x7fcc3d023f3d --> offset 65536         + 1 Region __DATA_DIRTY /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation __DATA_DIRTY __data: '__CFRuntimeClassTable' + 2224 0x7fff80292090         + 1 Region __DATA_DIRTY /System/Library/Frameworks/Security.framework/Versions/A/Security __DATA_DIRTY __bss: 'Security::KeychainCore::gTypes()::nexus' 0x7fff803182a0         1 0x7fcc3be10650 [784]   +477:  0x7fcc3be1082d --> offset 65663           1 <icu::SharedDateFormatSymbols 0x7fcc3d02c000> [1536]   +128:  0x7fcc3d02c080 --> offset 8             1 0x7fcc3c813200 [3072]  +2480:  0x7fcc3c813bb0               1 0x7fcc3bf056a0 [80]     +0:  0x7fcc3bf056a0                 1 <icu::UnifiedCache 0x7fcc3bf05660> [64]     +8:  0x7fcc3bf05668                   1 Region __DATA_DIRTY /usr/lib/libicucore.A.dylib __DATA_DIRTY __bss + 3552 0x7fff8081cf30     2 VM: Accounts framework  0x112bb2000-0x112bc3000 [V=68K] r--/r--         2 Region Accounts framework  region + 0 0x110ff0000         2 0x7fcc3be06ea0 [432]   +197:  0x7fcc3be06f65 --> offset 65663           1 Region __DATA_DIRTY /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation __DATA_DIRTY __data: '__CFRuntimeClassTable' + 2176 0x7fff80292060           1 Region __DATA_DIRTY /System/Library/Frameworks/Security.framework/Versions/A/Security __DATA_DIRTY __bss: 'Security::CodeSigning::gCFObjects' 0x7fff803180d8 Is this a system bug? And what is VM: Accounts framework?
Replies
4
Boosts
0
Views
1.3k
Activity
Aug ’22