lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D5F509220@AcuExch.aculab.com>
Date:	Thu, 4 Aug 2016 09:13:03 +0000
From:	David Laight <David.Laight@...LAB.COM>
To:	'Phil Sutter' <phil@....cc>, David Miller <davem@...emloft.net>
CC:	Xin Long <lucien.xin@...il.com>,
	Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH v2 1/3] sctp: Export struct sctp_info to userspace

From: Phil Sutter
> Sent: 03 August 2016 22:23
> This is required to correctly interpret INET_DIAG_INFO messages exported
> by sctp_diag module.
...
> diff --git a/include/linux/sctp.h b/include/linux/sctp.h
> index de1f64318fc4e..fcb4c36461732 100644
> --- a/include/linux/sctp.h
> +++ b/include/linux/sctp.h
> @@ -705,70 +705,6 @@ typedef struct sctp_auth_chunk {
>  	sctp_authhdr_t auth_hdr;
>  } __packed sctp_auth_chunk_t;
> 
> -struct sctp_info {
> -	__u32	sctpi_tag;
...
> -	__u32	__reserved3;
> -};
> -
>  struct sctp_infox {
>  	struct sctp_info *sctpinfo;
>  	struct sctp_association *asoc;
> diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
> index d304f4c9792c4..a406adcc0793e 100644
> --- a/include/uapi/linux/sctp.h
> +++ b/include/uapi/linux/sctp.h
> @@ -944,4 +944,68 @@ struct sctp_default_prinfo {
>  	__u16 pr_policy;
>  };
> 
> +struct sctp_info {
> +	__u32	sctpi_tag;

Should these be uint32_t (etc) for userspace?

> +	__u32	sctpi_state;
...
> +	__u16	__reserved1;

Is it worth adding some extra pad here in case anything extra needs
to be added to this set of data?

...
> +	__u32	__reserved3;

Think I'd definitely add a few words of pad here.
Or at least make absolutely sure the interface passes the buffer length and
allows for kernels that report different length buffers.

> +};

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ