VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Setup/Wizard.h
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2025-01-11 17:26:03 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2025-01-14 14:59:40 +0100
commit2cca2e1dafa405addc3af8724baf8563f352ac1c (patch)
treee8525cfe9262bbba0c02f14518e1259d5a972e75 /src/Setup/Wizard.h
parent1b35abb191c56fa9890ff3f145fd866bbff361c1 (diff)
downloadVeraCrypt-2cca2e1dafa405addc3af8724baf8563f352ac1c.tar.gz
VeraCrypt-2cca2e1dafa405addc3af8724baf8563f352ac1c.zip
Linux/FreeBSD: Add absolute paths for system binaries to prevent path hijacking (CVE-2024-54187, collaboration with SivertPL @__tfr)
This commit fixes a critical security vulnerability where VeraCrypt could be tricked into executing malicious binaries with elevated privileges. The vulnerability has two severe implications: 1. When sudo's secure_path option is disabled, attackers could execute malicious binaries with root privileges by placing them in user-writable PATH directories (e.g., making "sudo mount" execute a malicious mount binary) 2. By placing a malicious sudo binary in PATH, attackers could intercept and steal the user's password when VeraCrypt prompts for sudo authentication The vulnerability allowed attackers to place malicious binaries in user-writable directories that appear in PATH before system directories, potentially leading to privilege escalation and credential theft. Key changes: - Implement FindSystemBinary() to locate executables in secure system paths - Replace all relative binary paths with absolute paths for system commands - Add security checks for executable permissions - Update process execution to use absolute paths for: * sudo * mount * fsck * terminal emulators * file managers * system utilities (hdiutil, mdconfig, vnconfig, lofiadm) The fix ensures all system binaries are called using their absolute paths from secure system directories, preventing both privilege escalation through PATH manipulation and password theft through sudo hijacking. Security: CVE-2024-54187
Diffstat (limited to 'src/Setup/Wizard.h')
0 files changed, 0 insertions, 0 deletions
='#n140'>140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299