mumble/src
Robert Adam 80a1796079
Merge PR #6372: FIX(server): Stale user pointers in whisper cache
Since the whisper cache entry was computed while holding the read-lock,
it was possible for a user in that cache to get deleted while the voice
thread drops the read lock in order to upgrade it to a write lock. In
such a case, the cache entry would contain an invalid (stale) user
pointer, which can lead to crashes when using the cache later on.

By moving the cache entry computation into the block in which we already
hold a read lock, we turn computing the cache and adding it to the cache
store into an atomic operation. As soon as the cache entry is in the
store, deleting a user is no longer an issue as that will implicitly
clear all whisper caches (thereby preventing stale cache entries).

Additionally, the cache creation has been factored out into its own function (for improved readability)
2024-04-06 17:29:28 +02:00
..
benchmarks MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
crypto REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
mumble TRANSLATION: Update Dutch translation 2024-04-04 21:08:36 +00:00
murmur REFAC(server): Refactor WhisperTarget struct 2024-04-06 16:58:02 +02:00
tests REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
ACL.cpp MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
ACL.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
Ban.cpp MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
Ban.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
ByteSwap.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
Channel.cpp REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
Channel.h REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
ChannelListenerManager.cpp REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
ChannelListenerManager.h REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
CMakeLists.txt BUILD(cmake): Module to fetch compiler-dependent flags 2024-01-07 17:10:11 +01:00
Connection.cpp REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
Connection.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
CryptState.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
EnvUtils.cpp REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
EnvUtils.h REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
FFDHE.cpp MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
FFDHE.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
Group.cpp MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
Group.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
HostAddress.cpp FIX(client): Use IPv4 HostAddress representation where applicable 2024-02-28 20:36:46 +00:00
HostAddress.h REFAC: Get rid of union in HostAddress 2024-01-07 17:10:11 +01:00
HTMLFilter.cpp MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
HTMLFilter.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
License.cpp MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
License.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
LogEmitter.cpp REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
LogEmitter.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
Mumble.proto MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
MumbleConstants.h REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
MumbleProtocol.cpp REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
MumbleProtocol.h REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
MumbleUDP.proto MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
Net.cpp MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
Net.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
OSInfo.cpp REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
OSInfo.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
PacketDataStream.h REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
PasswordGenerator.cpp MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
PasswordGenerator.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
PlatformCheck.cpp MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
PlatformCheck.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
ProcessResolver.cpp REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
ProcessResolver.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
ProtoUtils.cpp REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
ProtoUtils.h REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
QtUtils.cpp REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
QtUtils.h REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
SelfSignedCertificate.cpp MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
SelfSignedCertificate.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
ServerAddress.cpp REFAC: Get rid of union in HostAddress 2024-01-07 17:10:11 +01:00
ServerAddress.h REFAC: Get rid of union in HostAddress 2024-01-07 17:10:11 +01:00
ServerResolver.cpp MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
ServerResolver.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
ServerResolverRecord.cpp MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
ServerResolverRecord.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
SignalCurry.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
SSL.cpp MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
SSL.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
SSLLocks.cpp REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
SSLLocks.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
Timer.cpp MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
Timer.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
UnresolvedServerAddress.cpp MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
UnresolvedServerAddress.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
User.cpp MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
User.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
Utils.h REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
Version.cpp REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
Version.h REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
VolumeAdjustment.cpp REFAC: Fix tons of warnings and non-portable code 2024-01-07 17:10:11 +01:00
VolumeAdjustment.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
win.h MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00