.\" -*- coding: UTF-8 -*- .\" Copyright (C) 2017 Michael Kerrisk .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH BZERO 3 "6 Marzo 2019" Linux "Manual del Programador de Linux" .SH NOMBRE bzero explicit_bzero \- escribe bytes cero .SH SINOPSIS .nf \fB#include \fP .PP \fBvoid bzero(void *\fP\fIs\fP\fB, size_t \fP\fIn\fP\fB);\fP .PP \fB#include \fP .PP \fBvoid explicit_bzero(void *\fP\fIs\fP\fB, size_t \fP\fIn\fP\fB);\fP .fi .SH DESCRIPCIÓN The \fBbzero\fP() function erases the data in the \fIn\fP bytes of the memory starting at the location pointed to by \fIs\fP, by writing zeros (bytes containing \(aq\e0\(aq) to that area. .PP The \fBexplicit_bzero\fP() function performs the same task as \fBbzero\fP(). It differs from \fBbzero\fP() in that it guarantees that compiler optimizations will not remove the erase operation if the compiler deduces that the operation is "unnecessary". .SH "VALOR DEVUELTO" Ninguna. .SH VERSIONES \fBexplicit_bzero\fP() apareció por primera vez en la versión 2.25 de glibc. .SH ATRIBUTOS Para obtener una explicación de los términos usados en esta sección, véase \fBattributes\fP(7). .TS allbox; lb lb lb l l l. Interfaz Atributo Valor T{ \fBbzero\fP(), .br \fBexplicit_bzero\fP() T} Seguridad del hilo Multi\-hilo seguro .TE .SH "CONFORME A" The \fBbzero\fP() function is deprecated (marked as LEGACY in POSIX.1\-2001); use \fBmemset\fP(3) in new programs. POSIX.1\-2008 removes the specification of \fBbzero\fP(). The \fBbzero\fP() function first appeared in 4.3BSD. .PP La función \fBexplicit_bzero\fP() es una extensión no estándar presente también algunos BSD. Otras implementaciones incluyen funciones similares tales como \fBmemset_explicit\fP() o \fBmemset_s\fP(). .SH NOTAS The \fBexplicit_bzero\fP() function addresses a problem that security\-conscious applications may run into when using \fBbzero\fP(): if the compiler can deduce that the location to zeroed will never again be touched by a \fIcorrect\fP program, then it may remove the \fBbzero\fP() call altogether. This is a problem if the intent of the \fBbzero\fP() call was to erase sensitive data (e.g., passwords) to prevent the possibility that the data was leaked by an incorrect or compromised program. Calls to \fBexplicit_bzero\fP() are never optimized away by the compiler. .PP La función \fBexplicit_bzero\fP() no resuelve todos los problemas relacionados con el borrado de información sensible: .IP 1. 3 The \fBexplicit_bzero\fP() function does \fInot\fP guarantee that sensitive data is completely erased from memory. (The same is true of \fBbzero\fP().) For example, there may be copies of the sensitive data in a register and in "scratch" stack areas. The \fBexplicit_bzero\fP() function is not aware of these copies, and can't erase them. .IP 2. In some circumstances, \fBexplicit_bzero\fP() can \fIdecrease\fP security. If the compiler determined that the variable containing the sensitive data could be optimized to be stored in a register (because it is small enough to fit in a register, and no operation other than the \fBexplicit_bzero\fP() call would need to take the address of the variable), then the \fBexplicit_bzero\fP() call will force the data to be copied from the register to a location in RAM that is then immediately erased (while the copy in the register remains unaffected). The problem here is that data in RAM is more likely to be exposed by a bug than data in a register, and thus the \fBexplicit_bzero\fP() call creates a brief time window where the sensitive data is more vulnerable than it would otherwise have been if no attempt had been made to erase the data. .PP Note that declaring the sensitive variable with the \fBvolatile\fP qualifier does \fInot\fP eliminate the above problems. Indeed, it will make them worse, since, for example, it may force a variable that would otherwise have been optimized into a register to instead be maintained in (more vulnerable) RAM for its entire lifetime. .PP Notwithstanding the above details, for security\-conscious applications, using \fBexplicit_bzero\fP() is generally preferable to not using it. The developers of \fBexplicit_bzero\fP() anticipate that future compilers will recognize calls to \fBexplicit_bzero\fP() and take steps to ensure that all copies of the sensitive data are erased, including copies in registers or in "scratch" stack areas. .SH "VÉASE TAMBIÉN" \fBbstring\fP(3), \fBmemset\fP(3), \fBswab\fP(3) .SH COLOFÓN Esta página es parte de la versión 5.10 del proyecto Linux \fIman\-pages\fP. Puede encontrar una descripción del proyecto, información sobre cómo informar errores y la última versión de esta página en \%https://www.kernel.org/doc/man\-pages/. .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Sebastian Desimone , Cesar D. Lobejon , Miguel Pérez Ibars y Marcos Fouces . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .