/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to debian/mandos-client.README.Debian

  • Committer: teddy at recompile
  • Date: 2020-12-03 20:30:45 UTC
  • Revision ID: teddy@recompile.se-20201203203045-iqd6nq9y5nwalh1x
Minor fix of a test function

In dracut-module/password-agent, the test function
test_send_password_to_socket_EMSGSIZE() (which tests that the
send_password_to_socket() task function aborts properly when getting
EMSGSIZE when writing to the password socket), part of the test code
is supposed to find a message size which definitely does trigger
EMSGSIZE when send()ing to a socket.  Without a "break" in the proper
place, however, the size given is always exactly 1024 bytes too large.

This is very probably not a problem, since a too large message will
still be too large if it is increased by 1024 bytes, and send(2) in
practice checks the size before reading the buffer.  The biggest issue
would be if some version of send(2) would try to look at the last 1024
bytes of the message buffer before checking the message size; this
would then lead to a buffer over-read when running this test function.
(But even then there would be no security implications since the tests
are not run in the normal operation of the program.)

* dracut-module/password-agent.c
  (test_send_password_to_socket_EMSGSIZE): Break out early when ssret
  < 0 and errno == EMSGSIZE; don't allow loop to increase message_size
  again.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
  setting is changed, it will be necessary to update the initrd image
50
50
  by running this command:
51
51
  
 
52
        (For initramfs-tools:)
52
53
        update-initramfs -k all -u
 
54
        
 
55
        (For dracut:)
 
56
        dpkg-reconfigure dracut
53
57
  
54
58
  The device can also be overridden at boot time on the Linux kernel
55
59
  command line using the sixth colon-separated field of the "ip="
60
64
  Note that since the network interfaces are used in the initial RAM
61
65
  disk environment, the network interfaces *must* exist at that stage.
62
66
  Thus, an interface can *not* be a pseudo-interface such as "br0" or
63
 
  "tun0"; instead, only real interfaces (such as "eth0") can be used.
64
 
  This can be overcome by writing a "network hook" program to create
65
 
  an interface (see mandos-client(8mandos)) and placing it in
66
 
  "/etc/mandos/network-hooks.d", from where it will be copied into the
67
 
  initial RAM disk.  Example network hook scripts can be found in
68
 
  "/usr/share/doc/mandos-client/examples/network-hooks.d".
 
67
  "tun0"; instead, only real interfaces (such as "enp1s0" or "eth0")
 
68
  can be used. This can be overcome by writing a "network hook"
 
69
  program to create an interface (see mandos-client(8mandos)) and
 
70
  placing it in "/etc/mandos/network-hooks.d", from where it will be
 
71
  copied into the initial RAM disk.  Example network hook scripts can
 
72
  be found in "/usr/share/doc/mandos-client/examples/network-hooks.d".
69
73
 
70
74
* User-Supplied Plugins
71
75
  
73
77
  to the normal Mandos plugins.  When adding or changing plugins, do
74
78
  not forget to update the initital RAM disk image:
75
79
  
 
80
        (For initramfs-tools:)
76
81
        update-initramfs -k all -u
 
82
        
 
83
        (For dracut:)
 
84
        dpkg-reconfigure dracut
77
85
 
78
86
* Do *NOT* Edit "/etc/crypttab"
79
87
  
108
116
  policy or other reasons, simply replace the existing dhparams.pem
109
117
  file and update the initital RAM disk image.
110
118
 
111
 
 -- Teddy Hogeborn <teddy@recompile.se>, Sat,  9 Feb 2019 15:08:04 +0100
 
119
 -- Teddy Hogeborn <teddy@recompile.se>, Mon, 15 Jul 2019 16:47:02 +0200