mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 04:30:09 +01:00
core: don't use pointer value for pending action string in active-connection
The pending action gets logged. We should not log plain pointer values because they may be used to defeat ASLR. Instead, construct the pending action using the "version_id". This number is also unique, and suits sufficiently well. With debug logging you can still grep the log for the corresponding active-connection (and anyway it's obvious from the context).
This commit is contained in:
parent
7fed51fa7b
commit
10c63f167d
1 changed files with 1 additions and 1 deletions
|
|
@ -707,7 +707,7 @@ nm_active_connection_set_device (NMActiveConnection *self, NMDevice *device)
|
|||
G_CALLBACK (device_metered_changed), self);
|
||||
|
||||
if (priv->activation_type != NM_ACTIVATION_TYPE_EXTERNAL) {
|
||||
priv->pending_activation_id = g_strdup_printf (NM_PENDING_ACTIONPREFIX_ACTIVATION"%p", (void *)self);
|
||||
priv->pending_activation_id = g_strdup_printf (NM_PENDING_ACTIONPREFIX_ACTIVATION"%"G_GUINT64_FORMAT, priv->version_id);
|
||||
nm_device_add_pending_action (device, priv->pending_activation_id, TRUE);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue