Age | Commit message (Collapse) | Author | Files | Lines |
|
The Tizen's branch code that added Cynara integration had changed
return types in some functions from dbus_bool_t to BusResult. The code
from upstream master branch uses dbus_bool_t. While merging recent
changes from the upstream, there were some parts that were merged
without changing TRUE/FALSE to BUS_RESULT_* or with checking conditions
as bool values instead of checking the enum.
The above, and the fact that TRUE==1, FALSE==0, BUS_RESULT_TRUE==0,
BUS_RESULT_FALSE==1 has led to aborting on asserts, when enabled.
This could also lead to issues with activation.
This commit fixes the TRUE/FALSE handling where needed.
Change-Id: I6cbf1aa0b43699464c9214b50fd8bb23a84709e8
|
|
Change-Id: I5a5893d56c1d4fd98d3dc807319c73c9791dff6a
|
|
Session dbus-daemon may have no rights to look into cmdline in /proc.
In such cases logs are cluttered with access denied.
This commit disables checking cmdline for session dbus-daemon.
(Before)
May 21 08:13:06 localhost dbus-daemon[676]: [session uid=5001 pid=676] Rejected send message, 1 matched rules; type="method_call", send
er=":1.33" (uid=5001 pid=1090 comm="/usr/apps/org.tizen.multi-assistant-service/bin/or" label="User::Pkg::org.tizen.multi-assistant-ser
vice") interface="org.freedesktop.DBus" member="RequestName" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus
" privilege="(n/a)" (bus) rule(<deny send_type="method_call" />)
(After)
May 21 08:21:55 localhost dbus-daemon[678]: [session uid=5001 pid=678] Rejected send message, 1 matched rules; type="method_call", send
er=":1.33" (uid=5001 pid=1110 comm="<not-read>" label="User::Pkg::org.tizen.multi-assistant-service") interface="org.freedesktop.DBus"
member="RequestName" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" privilege="(n/a)" (bus) rule(<deny sen
d_type="method_call" />)
Change-Id: I15c3b9b2a5675546b6adb3b1521e790088bd8f85
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
|
|
can_send_result may be uninitialized for cases with no send_policy.
Change-Id: I0f490c3c6920df525f5583b421162f7f33b8cb68
|
|
Change-Id: I362319c7de7ac38f68595202efe8fb2b3c5a3389
|
|
Check policy at moments, when sender is still present, so the policy
can be checked for both sender and receiver.
This way only potential waiting for cynara check is left with no need
to access any connection data.
Change-Id: I6544740c6e31dee286261fe3cddb3f692c669c4d
|
|
This will allow altering existing deferred messages, enabling
concurrent asynchronous cynara checks for SEND and RECEIVE.
Change-Id: I1f31c173e4229661bca9f14ecaa158ee67342db4
|
|
Initialize deferred messages in order to be able to alter them
on concurrent Cynara calls. This way we'll be able to run
both asynchronous requests for SEND and RECEIVE, if needed.
Change-Id: I060969ad5645c6a1d72f1c91edb46ecc3217ef79
|
|
Get const data instead of non-const data for constant strings.
It triggered asserts when they are enabled, although the underlying
production code is the same.
Change-Id: Ic7102b6601ca168e6bf5f6902988a06c6ab76f03
|
|
Change-Id: I68962e09d1c2c8ef367a4766c23e7b15cf1e6dc1
Signed-off-by: Deepak Singh <deepak.sn@samsung.com>
|
|
Change-Id: Ie56e99fc5c8038863b69b350128f2d6eef1acc6a
|
|
/run/dbus/system_bus_socket
Journal Log
- Jan 01 09:11:45 localhost systemd[1]: /usr/lib/systemd/system/dbus.socket:8: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly
Change-Id: Idf5d68e791efc70ef324a0ba50807a5512815ac7
Ref: https://gitlab.freedesktop.org/dbus/dbus/-/issues/180
|
|
This reverts commit bbacc6024e474f4e7dd1387618209cab9524a95c.
- security-manager's nss plugin removed the dependency with security-manager service.
- So, deadlock is removed.
Change-Id: I047da2ae670f59a6dcac9f58877c49f77bb25c7f
|
|
Change-Id: Ie3e28ff56652ee454ad1f7362a93fec0973af0f6
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
|
|
State clearly that libdbus and dbus-daemon are distributed under AFL-2.1
license in Tizen (including kdbus support).
The tools that are in "dbus" package are under various licensed so all
are listed.
Change-Id: Ibfc3731e1e4bc0f59d9eae198ecc453fb9bea180
|
|
Change-Id: I7c9f8584c81602c773c342360dc12621c3e6b760
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
|
|
Check target name taken from message instead of org.freedesktop.DBus in case
of no peer available. This is the case when activation is happening.
Change-Id: I181edbb28a1b26ed79552bb6df8b00892d2ceac8
|
|
Only for send/receive/own rules in default context.
Change-Id: Iabbbfa5d582f9993b832f49193da93225c645014
|
|
Change-Id: I2854f6cc51b26ff04a9984778f899ba9656ba290
|
|
Change-Id: I42926c107aae0be1a1247a61f3558122b07f9914
|
|
Change-Id: I573ddbc7e64bef38ed7517644bd842728e14679b
|
|
Change-Id: I6267b3c7cc6fead8c4dd37967c122e1597239ebf
|
|
No functional changes, just packed arguments to structs.
Change-Id: I0e5a22a208ba7085727e617c52cd061c39524967
|
|
No functional changes, just moving code around.
This extracts check_send_rule, check_receive_rule,
and check_own_rule from their own respective
bus_client_policy_can_check_* functions.
Change-Id: Ice4b2b96054b33a376bc3f48df29447747e7980e
|
|
This removes optimization, because in subsequent commits
we're going to apply:
* direct checking of policy
* hash tables instead of lists.
Change-Id: I6de32c4a29bac1d185f76eb88b22198c9ea22413
|
|
Change-Id: Ideba1fea470bc0d38c04f428b23270fe6176ac95
|
|
Pending replies will increasing
1) if client sending lots of messages to destination at once
2) if server eats incoming messages.(no reply)
In case of 2) dbus-daemon still has pending information.
With default bus context option (reply_timeout=-1) it never freed.
Assuming 2) happended repeatedly, then it is hard to detect until it
exceeds maximum pending replies limit, because of dbus-daemon print warning messages
only if pending replies over bus limit(default 1024 for system bus).
Change-Id: Iee0515fac68af7586547cc5ef5e6fa73d388a312
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
|
|
Change-Id: I57c318bdf8a0e2d8d731c002185946930392718e
|
|
The layout introduced with GVariant was kind of mimicking
the real structure, as opposed to the original layout, which
was taking into account only total sizes.
Dbus-1.10.8 introduced some static assertions for the properties of
DBusMessageIter. These are incompatible with the "GVariant" layout.
Moreover, they show that the "GVariant" layout could be prone to
the copying, that could omit some fields or parts of fields, due
to its not "packed" structure.
This commit brings back the original layout, with modifications
suited for GVariant-sized DBusMessageRealIter.
As an additional feature - this should fix compilation for 64-bit
architectures.
Change-Id: Ie1cac3748d408c22acf177ede5fb9e4e29818c9b
|
|
The two files: sysusers.d/dbus.conf and tmpfiles.d/dbus.conf
are always installed into {%_prefix}/lib, even if libdir is %{_prefix}/lib64
or %{_prefix}/lib/x86_86-linux-gnu or %{_prefix}/what/ever.
This commit fixes spec file to package the files from %{_prefix}/lib
instead of %{_libdir}.
Change-Id: I1f3a99f04c4bc880a9e38f77c112acdb61bbd4ad
|
|
Change-Id: Ie55319b9a3075a1f1f12afadecc6c06c39e3dd3b
|
|
|
|
|
|
- spec: drop deprecated option --with-init-scripts
- spec: package new, installed files
- spec: acknowledge removing of dbus.socket from dbus.target.wants
- spec: add autoconf-archive build dependency
- acknowledge renaming HACKING to CONTRIBUTING.md
- spec: bump version to 1.12.16
|
|
dbus 1.12.16
|
|
This reverts commit 8d7fa32af68f2ba1f5da3494ce6d50e8e7c2c034.
Change-Id: Iaf3890e804b87b7c6751237e0ef93b3ad5db9ceb
|
|
This reverts commit 873bad7e9515fbafb8682fa6cdadfee629762e0d.
Change-Id: I642e8ca08d551320b56d97e682c969689640700f
|
|
Debugging is difficult due to lack of error information:
When the broadcast signal is blocked by dbus policy,
unlike other types of dbus messages,
dbus-daemon does not print any error logs,
it just passes an error message to the bus monitor.
Change-Id: I9c6c55530d64451403664ea1eee4b703360691eb
|
|
The DBUS_COOKIE_SHA1 authentication mechanism aims to prove ownership
of a shared home directory by having the server write a secret "cookie"
into a .dbus-keyrings subdirectory of the desired identity's home
directory with 0700 permissions, and having the client prove that it can
read the cookie. This never actually worked for non-malicious clients in
the case where server uid != client uid (unless the server and client
both have privileges, such as Linux CAP_DAC_OVERRIDE or traditional
Unix uid 0) because an unprivileged server would fail to write out the
cookie, and an unprivileged client would be unable to read the resulting
file owned by the server.
Additionally, since dbus 1.7.10 we have checked that ~/.dbus-keyrings
is owned by the uid of the server (a side-effect of a check added to
harden our use of XDG_RUNTIME_DIR), further ruling out successful use
by a non-malicious client with a uid differing from the server's.
Joe Vennix of Apple Information Security discovered that the
implementation of DBUS_COOKIE_SHA1 was susceptible to a symbolic link
attack: a malicious client with write access to its own home directory
could manipulate a ~/.dbus-keyrings symlink to cause the DBusServer to
read and write in unintended locations. In the worst case this could
result in the DBusServer reusing a cookie that is known to the
malicious client, and treating that cookie as evidence that a subsequent
client connection came from an attacker-chosen uid, allowing
authentication bypass.
This is mitigated by the fact that by default, the well-known system
dbus-daemon (since 2003) and the well-known session dbus-daemon (in
stable releases since dbus 1.10.0 in 2015) only accept the EXTERNAL
authentication mechanism, and as a result will reject DBUS_COOKIE_SHA1
at an early stage, before manipulating cookies. As a result, this
vulnerability only applies to:
* system or session dbus-daemons with non-standard configuration
* third-party dbus-daemon invocations such as at-spi2-core (although
in practice at-spi2-core also only accepts EXTERNAL by default)
* third-party uses of DBusServer such as the one in Upstart
Avoiding symlink attacks in a portable way is difficult, because APIs
like openat() and Linux /proc/self/fd are not universally available.
However, because DBUS_COOKIE_SHA1 already doesn't work in practice for
a non-matching uid, we can solve this vulnerability in an easier way
without regressions, by rejecting it early (before looking at
~/.dbus-keyrings) whenever the requested identity doesn't match the
identity of the process hosting the DBusServer.
Change-Id: I04d70bf97d78d25551e9adc217a4dd7652d428b6
Signed-off-by: Simon McVittie <smcv@collabora.com>
Closes: https://gitlab.freedesktop.org/dbus/dbus/issues/269
Closes: CVE-2019-12749
|
|
This reverts commit 662187a7597aaf9c9ad2a635944951e6174a36da.
We've optimized systemd-user without unified system/session.
So, we revert the patch for unified system/session.
Change-Id: I70ee37ebeda65e549c5f544d37d511cb6d54b757
|
|
Reconstruct rule with xml format.
Change-Id: I760f5c89f519672743a10fa15b66ac14b7e819a1
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
|
|
print out connection log
Change-Id: Ib0fc3be8b07577da687a024f5c39178dad387644
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
|
|
The bloom filters computing had been implemented in the past, basing
on systemd. However, the reimplementation introduced two bugs:
- no clearing of 'p' variable;
- clearing of hash_index variable in a wrong place.
This fixes the bugs.
The same applies to glib.
Change-Id: Ie7c602c6bc881e38c62f41d482ab3785b03c5503
|
|
This reverts commit c7fbfc743059b3e9988a359106ad459511b5ea78.
Change-Id: I86742a428f372ff6988a13df12694c550e2a53c2
|
|
fix Undefined Behavior Sanitizer error.
Change-Id: If3b68e68d4de753d0e66c0eeb07f626431057cbf
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
|
|
Change-Id: I4e67ff2258b11bab764f51cfe7e2ae01f2a11d49
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
|
|
|
|
The function defines and initializes local DBusError.
It is not used in kdbus_decode_msg() and function relies on assert for error.
So, remove the DBusError variable in kdbus_decode_msg().
Change-Id: Ic726f2a161f06766b081f1a98e83ff4f3834f75b
Signed-off-by: Himanshu Maithani <himanshu.m@samsung.com>
Signed-off-by: Gaurav Gupta <g.gupta@samsung.com>
|
|
Pass NULL as error argument to avoid setting error string in dbus_validate_bus_name(), thus avoid possible memory leak.
We expect the name to be valid bus name (utf8) as it is fetched from the connection.
It will also optimize stack usage as "local_error" variable & dbus_error_init() function are called in for loop.
Other fix could be to check free "error" if it is set.
Signed-off-by: Gaurav Gupta <g.gupta@samsung.com>
Reviewed-by: Himanshu Maithani <himanshu.m@samsung.com>
Change-Id: I773211edd76b6591369bbaae5464971894481a28
|
|
free message/name from the error in kdbus_write_msg_internal
Change-Id: I7f03abc0fc3f7c81e3725b3325f9e15209906e35
Signed-off-by: Himanshu Maithani <himanshu.m@samsung.com>
Signed-off-by: Gaurav Gupta <g.gupta@samsung.com>
|