Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bcrypt 4.3.0 cause module GLIBC_2.34 not found (same as cryptography 44.0.0) #39920

Open
maximeLeurent opened this issue Mar 3, 2025 · 4 comments
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Functions needs-author-feedback Workflow: More information is needed from author to address the issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@maximeLeurent
Copy link

maximeLeurent commented Mar 3, 2025

  • Package Name: bcrypt
  • Package Version: 4.3.0
  • Operating System: Linux
  • Python Version: python3.9

Describe the bug
I upgrade my python Azure Fonction App and got a import module error of glibc 2.34
I use paramiko to make SFTP exchange. And paramiko is using bcrypt to handle sshkey.
The new version of bcrypt 4.3.0 is causing a similiar issue of cryptography 44.0.0.
As mention in this post

While pinning to 43.0.x is a short term workaround, it is not the correct solution. pyca/cryptography is one of the earlier projects to ship a 2.34 wheel, but usage will only expand in the next year.

I think bcrypt is an other project to ship to Glibc 2.34

As work around, I downgrade the version to bcrypt to 4.2.1.

To Reproduce
Create a Azure Fonction App and import bcrypt module

function_app.py

import azure.functions as func
app = func.FunctionApp()

@app.function_name(name="HelloWorld")
@app.route(route="req")
def main(req: func.HttpRequest) -> str:
    import bcrypt

requirements.txt

bcrypt==4.3.0

Expected behavior
Module should be importable

Screenshots

Image

      
 #.... things link with my functionapp
      import paramiko
  File "/home/site/wwwroot/.python_packages/lib/site-packages/paramiko/__init__.py", line 22, in <module>
    from paramiko.transport import (
  File "/home/site/wwwroot/.python_packages/lib/site-packages/paramiko/transport.py", line 98, in <module>
    from paramiko.dsskey import DSSKey
  File "/home/site/wwwroot/.python_packages/lib/site-packages/paramiko/dsskey.py", line 37, in <module>
    from paramiko.pkey import PKey
  File "/home/site/wwwroot/.python_packages/lib/site-packages/paramiko/pkey.py", line 32, in <module>
    import bcrypt
  File "/home/site/wwwroot/.python_packages/lib/site-packages/bcrypt/__init__.py", line 13, in <module>
    from ._bcrypt import (
ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /home/site/wwwroot/.python_packages/lib/site-packages/bcrypt/_bcrypt.abi3.so)

Additional context
Deployment done from github action, by zip artefact.

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Mar 3, 2025
@maximeLeurent maximeLeurent changed the title bcrypt 4.3.0 cause module GLIBC 2.34 not found (same as cryptography 44.0.0) bcrypt 4.3.0 cause module GLIBC_2.34 not found (same as cryptography 44.0.0) Mar 3, 2025
@xiangyan99 xiangyan99 added Service Attention Workflow: This issue is responsible by Azure service team. Functions and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Mar 3, 2025
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Mar 3, 2025
Copy link

github-actions bot commented Mar 3, 2025

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ahmedelnably @fabiocav.

@exp956
Copy link

exp956 commented Mar 3, 2025

I am also facing this same issue since version 4.3.0 was released of bcrypt. Downgrading to version 4.2.1 of bcrypt does provide a temporary fix, but we will need a permanent fix that doesn't rely on a downgraded (and possibly vulnerable) version of a Python library.

@kristapratico kristapratico added the Client This issue points to a problem in the data-plane of the library. label Mar 3, 2025
@pvaneck
Copy link
Member

pvaneck commented Mar 4, 2025

Are you able to use the Python 3.12 runtime stack (note: it's currently in preview as tracked here: Azure/azure-functions-python-worker#1397)? It appears that the 3.12 runtime stack has a newer version of glibc where newer versions of bcrypt/cryptography can be used.

@xiangyan99 xiangyan99 added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Mar 6, 2025
Copy link

github-actions bot commented Mar 6, 2025

Hi @maximeLeurent. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

@github-actions github-actions bot removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Functions needs-author-feedback Workflow: More information is needed from author to address the issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

5 participants