Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/sudo-project/sudo

Utility to execute a command as another user
https://github.com/sudo-project/sudo

Rework the intercept section in "Preventing shell escapes".

922772c6cbd5d06e9c3b58a419c8bed4ef70f0ae authored about 2 years ago by Todd C. Miller <[email protected]>
Update CodeQL Action to v2 using current example config.

351175eb266fdb8624dab7d58a37423728982d17 authored about 2 years ago by Todd C. Miller <[email protected]>
Suppress PVS-Studio false positive.

0af393e75bb1cc37f4941919037fb049ec71790a authored about 2 years ago by Todd C. Miller <[email protected]>
intercept_check_policy_req: an empty argv[] is now supported

2902ebe067cd731a30c976ea3caf5d564540eca4 authored about 2 years ago by Todd C. Miller <[email protected]>
Use process_vm_readv(2) and process_vm_writev(2) if available.

This is faster than reading/writing from/to the remote process one
word at a time using PTRACE_PE...

14356c19405c192ee212a60ceb7945ef278e0fe4 authored about 2 years ago by Todd C. Miller <[email protected]>
Skip all of check_user() for intercept unless intercept_authenticate set.

Previously we were calling the PAM approval modules even in intercept
mode which can take a lot o...

36747f89a80e2da550ab924202b05513a5f89013 authored about 2 years ago by Todd C. Miller <[email protected]>
Only set MODE_POLICY_INTERCEPTED on subsequent policy checks.

This fixes a bug where MODE_POLICY_INTERCEPTED was set too early
if the intercept option was set ...

22dad3f59c91e49e15cd9f57ab67da87fd27ad18 authored about 2 years ago by Todd C. Miller <[email protected]>
intercept_verify also compares the environment.

Also mention the overhead involved in checking things.

966eae6bf343aeeb136501fc228e4bfc7ea547db authored about 2 years ago by Todd C. Miller <[email protected]>
ptrace_getregs: make compat check more generic

No need to use different checks for mips and non-mips, the compiler
will optimize away the superf...

3d995f7e58a38b42b41ba94026e2b7a3042d9df4 authored about 2 years ago by Todd C. Miller <[email protected]>
Correct type of sudoers_audit.

GitHub issue #61

4d58fc904da6f8df7f1699b0c0d5d50060e039dd authored about 2 years ago by Todd C. Miller <[email protected]>
Fix shadowed variable warning.

a3a181df07efccc0d28571775cf1221f2ec31be9 authored about 2 years ago by Todd C. Miller <[email protected]>
Fix shadowed variable warning on aarch64.

c948717bd419ce58a80b0577fc9d1110970c653e authored about 2 years ago by Todd C. Miller <[email protected]>
Quiet another -Wwrite-strings warning.

8145ad12dad529cfd6b3b62eb94f75ebc3f54b7c authored about 2 years ago by Todd C. Miller <[email protected]>
ptrace_getregs: try to determine compat mode if caller doesn't know.

In ptrace_verify_post_exec(), we don't know whether the executable
that is now running is a nativ...

8eb619ac2b1af901ddd253aeaf74c4539f77b1a9 authored about 2 years ago by Todd C. Miller <[email protected]>
ptrace_intercept_execve: fail syscall rather than killing process on error.

If the execve(2) args are bogus pointers, we should just return an
error instead of killing the p...

b2d8909c1965ab0812d5d3fa7f623b07deb854b5 authored about 2 years ago by Todd C. Miller <[email protected]>
Treat argv and closure->run_argv of different sizes as a mismatch.

If argv and closure->run_argv match up to the point where we hit a
NULL but one of them has addit...

9f552471bceca7271cc599bd21c2c869bc161ae1 authored about 2 years ago by Todd C. Miller <[email protected]>
Handle the case where argc is 0 when allocating space for argv.

We need to pass the pathname to the policy plugin in argv[0] so we
must be sure to allocate space...

aef4a6188649ca13232cf5bad0ebdded77c4b768 authored about 2 years ago by Todd C. Miller <[email protected]>
copy_vector: treat a NULL pointer as an empty vector.

Linux execve(2) allows argv to be NULL so we must allocate an empty
vector in this case and not r...

76bd1bcc956c904a39863c1626394590ca8f71c2 authored about 2 years ago by Todd C. Miller <[email protected]>
Update debug_decl name for sudo_preload_dso -> sudo_preload_dso_alloc change.

48a9126a1b6c70369096d298aa3f638a80a3b8ee authored about 2 years ago by Todd C. Miller <[email protected]>
Handle the case where argc is 0 when rebuilding argv.

We need to pass the pathname to the policy plugin in argv[0] so we
must be sure to allocate space...

bc5016296d19e399984691c2a7fbb48ee87fc97c authored about 2 years ago by Todd C. Miller <[email protected]>
Handle sysconf(_SC_ARG_MAX) failure, Coverity CID 276504.

23fa22975cb529b6a1499b523cb27c19c682b0c3 authored about 2 years ago by Todd C. Miller <[email protected]>
Avoid a Coverity false positive.

d65bcf2ab35c068df6330a64ee13da35b8834aac authored about 2 years ago by Todd C. Miller <[email protected]>
Remove cast from time_t to int to avoid a Coverity false positive.

The cast should not be required.

81a3339df942fa88c86cd5c5ce14e88d29553c81 authored about 2 years ago by Todd C. Miller <[email protected]>
Use multilib rules to look for a 64-bit group plugin on failure.

If sudo_dso_load() fails on a 64-bit system, try to load a 64-bit
native version of the file usin...

158facf6d5852ebc420adca5ff06135b18ee57b8 authored about 2 years ago by Todd C. Miller <[email protected]>
regen

68b26056f927d87d83441f9c37b49d70f0c730e0 authored about 2 years ago by Todd C. Miller <[email protected]>
In putenv(3) replacement reject a string with no '=' or that starts with one.

2f3afd14ed5333fa268877490cb4aa6f1c9540d1 authored about 2 years ago by Todd C. Miller <[email protected]>
Update copyright year for embedded zlib.

6e08fa9fb220e26c61fadcc99246c32d47eac49b authored about 2 years ago by Todd C. Miller <[email protected]>
Use our own arc4random() in preference to the glibc version.

The glibc arc4random() may fail in chroot on older kernels and exit.

a366c623f17aef75f49abf48098fbde87a230ec8 authored about 2 years ago by Todd C. Miller <[email protected]>
sudo_dso_load: restore original error for AIX on failure.

For AIX, if dlopen() fails we try again with RTLD_MEMBER set
and a default member (shr.o or shr_6...

9ebaabfdded049f740b3180a98e4131aa4971178 authored about 2 years ago by Todd C. Miller <[email protected]>
Merge pull request #165 from bdrung/xdg-current-desktop

Add XDG_CURRENT_DESKTOP to initial_keepenv_table

184f0a249361c87e071e0e39840df968408dada4 authored about 2 years ago by Todd C. Miller <[email protected]>
Sudo 1.9.12.

b422ddea75124a0af2fa0149a23f9563766daf00 authored about 2 years ago by Todd C. Miller <[email protected]>
Bump the sudo plugin minor version.

The "update_ticket" entry was added to the settings list and the
"intercept_verify" entry was add...

9c61d7e6e99decc0366e97dcb32ca3d8aa1c7d72 authored about 2 years ago by Todd C. Miller <[email protected]>
Add a way to run a command without updating the cached credentials.

This can also be used to test for whether or not the user's
credentials are currently cached.

556dacf1ff0b8dab0e3d0de4a2e21f71e36fe424 authored about 2 years ago by Todd C. Miller <[email protected]>
Merge pull request #168 from likunyur/lky

Remove unnecessary initialization and casts.

2d94d329cf9cf1f253fb15d02d76f2a9138f9b67 authored about 2 years ago by Todd C. Miller <[email protected]>
iolog/hostcheck: These two parameters do not need to be initialized and assigned, the following code is directly assigned

Signed-off-by: Li zeming <[email protected]>

393d9997cbc4798e2cb22f4518fbc024ed9d6706 authored about 2 years ago by Li zeming <[email protected]>
util/arc4random: (void*) type pointer passing address could remove cast

Signed-off-by: Li zeming <[email protected]>

c27acf55eca26e4dcb390053a319426a05ee1d7f authored about 2 years ago by Li zeming <[email protected]>
Merge pull request #169 from kempstonjoystick/main

Fix incorrect SHA384/512 digest calculation.

210eb17cb7d9852a39db4d6d43cb65f8bf4ccea2 authored about 2 years ago by Todd C. Miller <[email protected]>
Fix incorrect SHA384/512 digest calculation.

Resolves an issue where certain message sizes result in an incorrect
checksum. Specifically, whe...

e4f08157b6693b956fe9c7c987bc3eeac1abb2cc authored about 2 years ago by Tim Shearer <[email protected]>
Defer chdir(2) until sesh when running with SELinux.

We need to be running with the correct security context or the
chdir(2) may fail. GitHub issue #...

cf250354fca318ad5e44e98befb90cd83fc7cfe4 authored about 2 years ago by Todd C. Miller <[email protected]>
Merge pull request #166 from c4rlo/patch-1

visudo.c: add nvim (Neovim) to lineno_editor list

555474d3aac36dfd1ac961590a694703ffe50398 authored about 2 years ago by Todd C. Miller <[email protected]>
visudo.c: add nvim (Neovim) to lineno_editor list

Neovim supports it: https://neovim.io/doc/user/starting.html#-+

2b5dcf255db7af59e0ab5c01cf9e444e3e641e4f authored about 2 years ago by Carlo Teubner <[email protected]>
Document the TOCTOU issue with intercept mode.

Describe how intercept_verify attempts to reduce the risk.

4de5e12ddbd8c6b43f23784e94c1a3bbb02422ee authored about 2 years ago by Todd C. Miller <[email protected]>
Update a codespell exclude pattern.

3eb6e785697084373ec91f3db5dde3ae2a3e55dc authored about 2 years ago by Todd C. Miller <[email protected]>
Add intercept_verify sudoers option to control execve(2) argument checking.

3ce19efca958e607ab5a24fea3baf3adfbc4aac6 authored about 2 years ago by Todd C. Miller <[email protected]>
Use PTRACE_EVENT_EXEC to stop execution before return from execve(2).

We can now verify that the arguments match what we accepted before
the command actually runs. If...

b80b012de0248691c152027a7aa2f7cc4a7e8b88 authored about 2 years ago by Todd C. Miller <[email protected]>
Only set MODE_POLICY_INTERCEPTED if we are running a command.

Fixes an error with "sudo -l" when intercept is enabled globally.

620a563b547c0d6f508fbcc30f552f1da97c45e0 authored about 2 years ago by Todd C. Miller <[email protected]>
Add XDG_CURRENT_DESKTOP to initial_keepenv_table

Qt needs `XDG_CURRENT_DESKTOP` to be set to determine the correct theme.

Since `DISPLAY` and `X...

225feb386e29dc15169356e6edd589051e43f8db authored about 2 years ago by Benjamin Drung <[email protected]>
The length returned by ptrace_read_string() include the NUL.

We were wasting a extra byte in the string table for each entry.

25513b4f37fce479fdd0d82d7155cd17e68491c0 authored about 2 years ago by Todd C. Miller <[email protected]>
Use gcc's malloc attribute for malloc-like allocation functions.

882990b1b3d017d3db472413090046ada2437ddf authored about 2 years ago by Todd C. Miller <[email protected]>
Avoid a Coverity positive.

23ab31fce00e10f46bc705229bf33dbba64b34cf authored about 2 years ago by Todd C. Miller <[email protected]>
fmtstr: add missing va_end() for the overflow case

Coverity CID 275335

6c9b3c7613af54a63e7dc4a2207831467a4eb8d9 authored about 2 years ago by Todd C. Miller <[email protected]>
Fix potential NULL pointer deference found by clang-analyzer.

3421c8b6cedc582ed5eab573f59d4feddc7e1ab3 authored about 2 years ago by Todd C. Miller <[email protected]>
Quiet some harmless PVS-Studio warnings.

f5dc739ea30a7ca7f6c55019e8169e4dac8e150c authored about 2 years ago by Todd C. Miller <[email protected]>
Reject relative command paths if runcwd is not set.

This is now treated as a policy rejection.

de3d5fe934f540819b11872c654b7baf353d351f authored about 2 years ago by Todd C. Miller <[email protected]>
intercept_check_policy: close saved_dir before returning

16ea0bb3fd9e8f1bc354515b50f5e1976c146955 authored about 2 years ago by Todd C. Miller <[email protected]>
Change to runcwd during the policy check where possible.

Otherwise, attempts to run "./command" from a shell with intercept
set will fail if the current w...

3c1f3ef1027705f321ec1995972aae09c0f7c1ac authored about 2 years ago by Todd C. Miller <[email protected]>
For preload DSO make copies of cmnd, argv, envp and map them read-only.

5516cdcd5bf51322e5c022acf99f52cc09cd49dc authored about 2 years ago by Todd C. Miller <[email protected]>
Use sudo_mmap_alloc functions in DSO-based intercept code.

226a6cd754fcf4f77e117402f9d163d2cb210b19 authored about 2 years ago by Todd C. Miller <[email protected]>
Use sudo_mmap_alloc functions instead of private versions.

We no longer need to keep track of the allocation size.

e43c964c43347e1dd8ac87ded15ca681b53eecbc authored about 2 years ago by Todd C. Miller <[email protected]>
Add sudo_mmap_{alloc,allocarrary,strdup,free} functions.

These allocate memory via mmap anonymous regions and store the mapped
size immediately before the...

fccf3c9c566f3a2e1752b827e04d3a21cd15d22f authored about 2 years ago by Todd C. Miller <[email protected]>
Sync with schema.OpenLDAP for user/group utf8 support.

308a6c31d94ae42905568fb6f77c02ee67f1cd76 authored about 2 years ago by Todd C. Miller <[email protected]>
Merge pull request #163 from Firstyear/20220725-sudo-ldap-schema

Update sudoUser to be utf8 in ldap schemas

36b603aa957a5f82d8076aa178b865f1cc795679 authored about 2 years ago by Todd C. Miller <[email protected]>
resolve_path: skip non-regular files

15fd62f0d5e30f537e444aa4251137f671bdc27c authored about 2 years ago by Todd C. Miller <[email protected]>
Update sudoUser to be utf8 in ldap schemas

In most unix-style LDAP servers, uid is a utf8 string defined by
OID 1.3.6.1.4.1.1466.115.121.1....

7f9ea23e7447b8e1308fc282cd13b6cf5d39d3c4 authored about 2 years ago by William Brown <[email protected]>
Make sure the plugin provides a command, argv and envp.

75e97fd5b29151dc25af0a2ce234d8f1936e640e authored over 2 years ago by Todd C. Miller <[email protected]>
Linux execve(2) allows argv or envp to be NULL.

Add checks to make sure we don't deference a NULL pointer.

e5652fc65a54ab2d3f161c264254579f00699b00 authored over 2 years ago by Todd C. Miller <[email protected]>
intercept_check_policy: add oom label and fix approval failure case.

If the approval plugin fails we need to set the state to POLICY_REJECT
just like we do if the pol...

a5ac29219aaaa17260e4e15f24c01f9c15e9bc72 authored over 2 years ago by Todd C. Miller <[email protected]>
Fix a few whitespace issues.

a2b0a8330c0a3f94d68a00207ad8f227e5551532 authored over 2 years ago by Todd C. Miller <[email protected]>
Increase the realloc increment from 128 to 1024.

The contents of the env_add array should not include the leading
"env=" prefix.

e7b7fbaf6e51634d950a4dccc2cc615bf6e7c35a authored over 2 years ago by Todd C. Miller <[email protected]>
sudo_putenv_nodebug: require that the environment string include a '='

224d78993a24d1cc31ae0f6a0d0a59c66b765387 authored over 2 years ago by Todd C. Miller <[email protected]>
If update_defaults() fails, treat it as a parse error.

fba81260ad50fb0c7ac77d260faf5f3e276d2ecc authored over 2 years ago by Todd C. Miller <[email protected]>
Add additional PVS-studio suppression comments for generated code.

3dc8497b48ccc68bc778ad01882fd8fcbda055ce authored over 2 years ago by Todd C. Miller <[email protected]>
Fix compilation error when SUDOERS_NAME_MATCH is defined.

a7f9c8162e9efafcc1709e17b766c2d934081994 authored over 2 years ago by Todd C. Miller <[email protected]>
Fix a NOPASSWD issue with a non-existent command when fdexec=always

In command_matches_all(), if the command is fully-qualified and
open_cmnd() return false, only tr...

5a59ce159e0c17fb35474c9c516d97703b338027 authored over 2 years ago by Todd C. Miller <[email protected]>
Quote ^foo$ on command line to protect it from the shell.

41e7532c90dcaf4e52c160f7ff747aa868294a66 authored over 2 years ago by Todd C. Miller <[email protected]>
Add explicit include of unistd.h for getopt(3) and related variables.

f6e4d2765a3f30bd73d07b9fa92a3fe3ff3bc3f6 authored over 2 years ago by Todd C. Miller <[email protected]>
Merge pull request #161 from likunyur/lky

sudoers/cvtsudoers: Remove the repeated ';' from code

fd0c5566aca200716562b213d74b5ebbdd86cff9 authored over 2 years ago by Todd C. Miller <[email protected]>
src/send: Remove the repeated ';' from code

Signed-off-by: Li kunyu <[email protected]>

a9a164e71c643d7171e4fe912e3ff5c533e3d123 authored over 2 years ago by Li kunyu <[email protected]>
sudoers/cvtsudoers: Remove the repeated ';' from code

Signed-off-by: Li kunyu <[email protected]>

a311180bbc8f81d227b33ba9c0e159f04df54ac5 authored over 2 years ago by Li kunyu <[email protected]>
In timegm() initialize tm_isdst to 0 like tzcode does.

42c6d9fb50628957e1d0478fc9eec7fe362eb026 authored over 2 years ago by Todd C. Miller <[email protected]>
Stop sending an InterceptResponse to a PolicyCheckRequest for log_subcmds.

There's no real reason for the command to wait for sudo send back a
response that will always be ...

3cd9c5f5e641dd5dced1c5b099c7d9c7f7e7bf9a authored over 2 years ago by Todd C. Miller <[email protected]>
sudoers_main: defer setting return value until the end when running a command

Otherwise, we could return success when there was an error from a
system call or memory allocatio...

985a2261bc5ae0491dc0be0977425c4f9a782883 authored over 2 years ago by Todd C. Miller <[email protected]>
Save the initial command run via sudo and use it when logging exit status.

Otherwise, if we are in intercept mode or logging sub-commands the
exit status will be logged wit...

885abf48d78c1da60fbb051d25b62b36e525fecf authored over 2 years ago by Todd C. Miller <[email protected]>
Define _LARGEFILE64_SOURCE if _FILE_OFFSET_BITS == 64.

Fixes a -Wwrite-strings warning on 32-bit systems.

3badff39cae10bba939ab3f61938b98d46f61a4c authored over 2 years ago by Todd C. Miller <[email protected]>
Quiet another -Wwrite-strings warning.

50813f8160300b2ab060726a08c5e5c1196915cd authored over 2 years ago by Todd C. Miller <[email protected]>
Fix a clang analyzer 14 warning about a possible NULL deref.

bfc6249902d842626058e74074832930feaf2f80 authored over 2 years ago by Todd C. Miller <[email protected]>
Regenerate dependencies

5f534979ef31ac584f4d93d6044cd1935ecfc502 authored over 2 years ago by Todd C. Miller <[email protected]>
Do not check files generated by protbuf-c with PVS-Studio

a14bef6a41a7b1851e03a39afe13c3f91678da69 authored over 2 years ago by Todd C. Miller <[email protected]>
Quiet some harmless PVS Studio warnings.

b6151781ce4684c4a977f6195afe9864eb57e86f authored over 2 years ago by Todd C. Miller <[email protected]>
Use "unable to allocate memory" warning on malloc failure.

This is consistent with the rest of the sudo source code.

54ed54d94ef4144caafb7ebf91a3237c655dc85d authored over 2 years ago by Todd C. Miller <[email protected]>
Add missing PVS Studio Open Source comments.

Also avoid checking protobuf-c source and protobuf-c generated files.

3e21c8da5cacb4a261d20301927c6ac52361d1e7 authored over 2 years ago by Todd C. Miller <[email protected]>
Use #include <config.h> not #include "config.h" for consistency.

Otherwise, some compilers may do the wrong thing in a build
dir if there is a config.h file in th...

e5834bd405906ba8ebde4f9ba99db6eb8b40a44d authored over 2 years ago by Todd C. Miller <[email protected]>
Update group_plugin_load() stub to match its prototype.

38278640ca76c9f88668ad7066df858d31dddf3f authored over 2 years ago by Todd C. Miller <[email protected]>
Make sudo pass -Wwrite-strings

13672f28df17d152d890b551ea659778d31b9273 authored over 2 years ago by Todd C. Miller <[email protected]>
A typo prevented -Wno-deprecated-declarations from being used on macOS.

b3a8cad3461157bffa337ce30d720087d6040f06 authored over 2 years ago by Todd C. Miller <[email protected]>
Fix missing prototype warning.

0efd61620298f07c027b46624c91b0a020002856 authored over 2 years ago by Todd C. Miller <[email protected]>
Define _LFS64_LARGEFILE, _LARGEFILE64_SOURCE if 64-bit or _LARGE_FILES set.

autoconf does not define _LARGEFILE64_SOURCE by default but zlib
expects it (its own configure sc...

89666e7c37ebb17d9df6dfc176c6844d1540dfc0 authored over 2 years ago by Todd C. Miller <[email protected]>
Make sudo pass -Wmissing-prototypes

f5ac1317c429ad9289d348c36600106f97cee411 authored over 2 years ago by Todd C. Miller <[email protected]>
Include inttypes.h if stdint.h is not present.

Bug #1035

f432209304e88a75e540f3a65b46890cfd795d08 authored over 2 years ago by Todd C. Miller <[email protected]>
readlink(2) does NUL-terminate the buffer, do it manually.

Fixes a bug where the current working directory could include garbage
in intercept mode using ptr...

33547702f365439b2316579e8b6e06ca1ec1530d authored over 2 years ago by Todd C. Miller <[email protected]>