bropat / eufy-security-ws

Small server wrapper around eufy-security-client library to access it via a WebSocket.
MIT License
184 stars 29 forks source link

[Bug]: Error after updating to V1.8.0 - Error during decryption RSA_PKCS1_PADDING is no longer supported #310

Closed RenZan closed 8 months ago

RenZan commented 8 months ago

Version

1.8.0

Node version

N/A

Operating System type

Other

Operating system version

N/A

Describe the bug

Hello, since I updated to 1.8.0, the livestream start of cameras is failing. I got this error in the journal logs:

WARN eufy-security-ws:eufy-security-client [p2p] [P2PClientProtocol.handleDataBinaryAndVideo] Error: AES key could not be decrypted! The entire stream is discarded. { error: { cause: undefined, message: 'Error: Error during decryption (probably incorrect key). Original error: TypeError: RSA_PKCS1_PADDING is no longer supported for private decryption, this can be reverted with --security-revert=CVE-2023-46809', context: undefined, stacktrace: 'Error: Error during decryption (probably incorrect key). Original error: TypeError: RSA_PKCS1_PADDING is no longer supported for private decryption, this can be reverted with --security-revert=CVE-2023-46809\n' + ' at module.exports.NodeRSA.$$decryptKey (/usr/src/app/node_modules/node-rsa/src/NodeRSA.js:301:19)\n' + ' at module.exports.NodeRSA.decrypt (/usr/src/app/node_modules/node-rsa/src/NodeRSA.js:249:21)\n' + ' at P2PClientProtocol.handleDataBinaryAndVideo (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:1355:63)\n' + ' at P2PClientProtocol.handleData (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:1295:18)\n' + ' at P2PClientProtocol.parseDataMessage (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:1152:26)\n' + ' at P2PClientProtocol.handleMsg (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:986:26)\n' + ' at Socket. (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:118:56)\n' + ' at Socket.emit (node:events:517:28)\n' + ' at Socket.emit (node:domain:489:12)\n' + ' at UDP.onMessage [as onmessage] (node:dgram:942:8)' },

To reproduce

Start a eufy camera livestream

Screenshots & Logfiles

No response

Additional context

No response

mathiaslehmann commented 8 months ago

Hello, unfortunately a stream to the camera no longer works after updating to 1.8.0. I get similar error as @RenZan

2024-03-04 10:17:13.206 WARN eufy-security-ws:eufy-security-client [p2p] [P2PClientProtocol.handleDataBinaryAndVideo] Error: AES key could not be decrypted! The entire stream is discarded. { error: { cause: undefined, message: 'Error: Error during decryption (probably incorrect key). Original error: TypeError: RSA_PKCS1_PADDING is no longer supported for private decryption, this can be reverted with --security-revert=CVE-2023-46809', context: undefined, stacktrace: 'Error: Error during decryption (probably incorrect key). Original error: TypeError: RSA_PKCS1_PADDING is no longer supported for private decryption, this can be reverted with --security-revert=CVE-2023-46809\n' + ' at module.exports.NodeRSA.$$decryptKey (/usr/src/app/node_modules/node-rsa/src/NodeRSA.js:301:19)\n' + ' at module.exports.NodeRSA.decrypt (/usr/src/app/node_modules/node-rsa/src/NodeRSA.js:249:21)\n' + ' at P2PClientProtocol.handleDataBinaryAndVideo (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:1355:63)\n' + ' at P2PClientProtocol.handleData (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:1295:18)\n' + ' at P2PClientProtocol.parseDataMessage (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:1152:26)\n' + ' at P2PClientProtocol.handleMsg (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:986:26)\n' + ' at Socket.<anonymous> (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:118:56)\n' + ' at Socket.emit (node:events:517:28)\n' + ' at Socket.emit (node:domain:489:12)\n' + ' at UDP.onMessage [as onmessage] (node:dgram:942:8)' }, stationSN: 'T8200N0021060425', key: 'This is actually where my key is' }

BVGorp commented 8 months ago

one of the issues I reported in https://github.com/bropat/eufy-security-client/issues/482

Dominik-1980 commented 8 months ago

I have the same problem with my Doorbell 2k.

I am using Home Assistant OS with this eufy-security-ws AddOn. Is there any way to set this environment variable "--security-revert=CVE-2023-46809"?

yenney commented 8 months ago

Adding +1 for eufy S340 cam

Craig-97 commented 8 months ago

Same issue for Doorbell 2k and the Eufy 2C Pro camera

BVGorp commented 8 months ago

I installed the updated version 1.8.0-1 but now the add-on isn't starting at all

Below is the log. enabling debug didn't add anything extra

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
fand0r1982 commented 8 months ago

Same issue, addon starts and immediately stops in version version 1.8.0-1

DavidinoX commented 8 months ago

Same, starts and then stops

Davide Neri

Il giorno gio 7 mar 2024 alle 19:50 fand0r1982 @.***> ha scritto:

Same issue, addon starts and immediately stops in version version 1.8.0-1

— Reply to this email directly, view it on GitHub https://github.com/bropat/eufy-security-ws/issues/310#issuecomment-1984210272, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH4JXFT5RUEBE7NV5QEZUPDYXCZFTAVCNFSM6AAAAABEE6R2PCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBUGIYTAMRXGI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

fand0r1982 commented 8 months ago

1.8.0-2 now fixed it! Thanks! 👍