SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Resolving Twilio Conversations iOS SDK Deprecated strncpy Symbol

Issue

When integrating the Twilio Conversations iOS SDK (versions 4.0.7, 4.0.8, and possibly others), developers may notice that a binary audit (e.g., using nm -u) reveals an undefined-symbol reference to the deprecated C function strncpy. This symbol appears in the SDK binary and, as a result, is present in the final app binary for any application that links the SDK.

 

Product

Twilio Conversations

 

Environment

Twilio Console

 

Cause

  • strncpy is a legacy C string function that is considered unsafe and deprecated in modern development due to risks of buffer overflows and memory corruption.
  • Security-conscious teams may flag the presence of such deprecated APIs in their dependency audits, even if the code is not executed at runtime.

Details

  • The presence of strncpy is due to a method in the SDK that references it.
  • According to Twilio engineering, this method is properly gated and unreachable from the SDK side. In other words, while the symbol is linked, it is never called or executed during normal SDK operation.
  • There is no runtime risk or impact to your application from this symbol being present in the binary.

 

Resolution

Twilio offers two paths forward, depending on your needs:

  1. If this warning is blocking your release:
    Contact Twilio Support and indicate that the presence of strncpy is a release blocker for your organization. Twilio can prioritize a fix to remove the reference.
  2. If this is not blocking:
    You can safely proceed with your release. The SDK is safe to use, as the code referencing strncpy is never executed.

How to Check for Deprecated Symbols

To audit your app binary for deprecated symbols, you can use the following command:

nm -u <path-to-TwilioConversationsClient-binary> | grep strncpy

If you see strncpy listed, refer to the guidance above.

 

Additional Information

  • There is currently no public roadmap or changelog entry for the removal of strncpy from the Conversations iOS SDK.
  • If your organization requires a version of the SDK without any deprecated C string APIs, please let Twilio Support know so your request can be prioritized.

 

Summary

  • The strncpy symbol in the Twilio Conversations iOS SDK is not used at runtime and does not pose a security risk.
  • Twilio can prioritize its removal if it is a blocker for your release.
  • For most use cases, you can proceed with your release without concern.
Have more questions? Submit a request
Powered by Zendesk