diff options
Diffstat (limited to 'meta-oe/recipes-support/procmail')
6 files changed, 300 insertions, 3 deletions
diff --git a/meta-oe/recipes-support/procmail/procmail/0001-fix-too-many-arguments-issue.patch b/meta-oe/recipes-support/procmail/procmail/0001-fix-too-many-arguments-issue.patch new file mode 100644 index 0000000000..9b98720b2e --- /dev/null +++ b/meta-oe/recipes-support/procmail/procmail/0001-fix-too-many-arguments-issue.patch | |||
@@ -0,0 +1,88 @@ | |||
1 | From 6f00795de8623347580c4366cb517a6653f73ca4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Liu Yiding <liuyd.fnst@fujitsu.com> | ||
3 | Date: Mon, 9 Jun 2025 08:01:39 +0000 | ||
4 | Subject: [PATCH] fix too many arguments issue | ||
5 | |||
6 | fix issue like: | ||
7 | | procmail.c:76:12: error: too many arguments to function 'auth_finduid'; expected 0, have 2 | ||
8 | | 76 | if(tpass=auth_finduid(uid,0)) /* save by copying */ | ||
9 | | | ^~~~~~~~~~~~ ~~~ | ||
10 | | In file included from procmail.c:36: | ||
11 | | authenticate.h:15:3: note: declared here | ||
12 | | 15 | *auth_finduid Q((const uid_t uid,const int sock)); | ||
13 | | -- | ||
14 | | procmail.c:212:9: error: too many arguments to function 'checkprivFrom_'; expected 0, have 3 | ||
15 | | 212 | checkprivFrom_(euid,passinvk?auth_username(passinvk):0,override); | ||
16 | | | ^~~~~~~~~~~~~~ ~~~~ | ||
17 | | In file included from procmail.c:41: | ||
18 | | from.h:9:2: note: declared here | ||
19 | | 9 | checkprivFrom_ Q((uid_t euid,const char*logname,int override)); | ||
20 | | -- | ||
21 | | procmail.c:213:9: error: too many arguments to function 'doumask'; expected 0, have 1 | ||
22 | | 213 | doumask(INIT_UMASK); /* allowed to set the From_ line? */ | ||
23 | | | ^~~~~~~ | ||
24 | | In file included from procmail.c:23: | ||
25 | | robust.h:12:2: note: declared here | ||
26 | | 12 | doumask Q((const mode_t mask)); | ||
27 | |||
28 | Upstream-Status: Submitted [https://github.com/BuGlessRB/procmail/pull/11] | ||
29 | Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com> | ||
30 | --- | ||
31 | src/authenticate.h | 2 +- | ||
32 | src/exopen.c | 2 +- | ||
33 | src/includes.h | 2 +- | ||
34 | src/misc.h | 1 + | ||
35 | 4 files changed, 4 insertions(+), 3 deletions(-) | ||
36 | |||
37 | diff --git a/src/authenticate.h b/src/authenticate.h | ||
38 | index be9d88d..31e665a 100644 | ||
39 | --- a/src/authenticate.h | ||
40 | +++ b/src/authenticate.h | ||
41 | @@ -7,7 +7,7 @@ typedef struct auth_identity auth_identity; | ||
42 | |||
43 | #ifndef P | ||
44 | #define P(x) x | ||
45 | -#define Q(x) () | ||
46 | +#define Q(x) x | ||
47 | #endif | ||
48 | |||
49 | /*const*/auth_identity | ||
50 | diff --git a/src/exopen.c b/src/exopen.c | ||
51 | index c7647e5..46e3467 100644 | ||
52 | --- a/src/exopen.c | ||
53 | +++ b/src/exopen.c | ||
54 | @@ -51,7 +51,7 @@ static const char*safehost P((void)) /* return a hostname safe for filenames */ | ||
55 | return sname; | ||
56 | } | ||
57 | |||
58 | -int unique(full,p,len,mode,verbos,flags)char*const full;char*p; | ||
59 | +int unique(full,p,len,mode,verbos,flags)const char*const full;char*p; | ||
60 | const size_t len;const mode_t mode;const int verbos,flags; | ||
61 | { static const char s2c[]=".,+%";static int serial=STRLEN(s2c); | ||
62 | static time_t t;char*dot,*end,*host;struct stat filebuf; | ||
63 | diff --git a/src/includes.h b/src/includes.h | ||
64 | index 7d6b41f..134805b 100644 | ||
65 | --- a/src/includes.h | ||
66 | +++ b/src/includes.h | ||
67 | @@ -530,7 +530,7 @@ extern void*memmove(); | ||
68 | * problems caused by one of those types being shorter than int and thereby | ||
69 | * being passed differently under ANSI rules. | ||
70 | */ | ||
71 | -#define Q(args) () | ||
72 | +#define Q(args) args | ||
73 | |||
74 | #ifdef oBRAIN_DAMAGE | ||
75 | #undef oBRAIN_DAMAGE | ||
76 | diff --git a/src/misc.h b/src/misc.h | ||
77 | index 4f62ebc..659dfcb 100644 | ||
78 | --- a/src/misc.h | ||
79 | +++ b/src/misc.h | ||
80 | @@ -1,4 +1,5 @@ | ||
81 | /*$Id: misc.h,v 1.56 2001/06/30 01:14:19 guenther Exp $*/ | ||
82 | +#include "authenticate.h" | ||
83 | |||
84 | struct dyna_array{int filled,tspace;char*vals;}; | ||
85 | union offori{off_t o;int i;}; | ||
86 | -- | ||
87 | 2.43.0 | ||
88 | |||
diff --git a/meta-oe/recipes-support/procmail/procmail/0001-fix-uname-declaration.patch b/meta-oe/recipes-support/procmail/procmail/0001-fix-uname-declaration.patch new file mode 100644 index 0000000000..adbc4f584a --- /dev/null +++ b/meta-oe/recipes-support/procmail/procmail/0001-fix-uname-declaration.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From a9e57d4048c94f6bc2533ccc41e6c35d4416571a Mon Sep 17 00:00:00 2001 | ||
2 | From: Liu Yiding <liuyd.fnst@fujitsu.com> | ||
3 | Date: Mon, 9 Jun 2025 06:44:06 +0000 | ||
4 | Subject: [PATCH] fix uname declaration | ||
5 | |||
6 | Upstream-Status: Submitted [https://github.com/BuGlessRB/procmail/pull/11] | ||
7 | Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com> | ||
8 | --- | ||
9 | src/includes.h | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/src/includes.h b/src/includes.h | ||
13 | index 4466907..7d6b41f 100644 | ||
14 | --- a/src/includes.h | ||
15 | +++ b/src/includes.h | ||
16 | @@ -331,7 +331,7 @@ extern int errno; | ||
17 | |||
18 | #ifndef NOuname | ||
19 | #ifndef P /* SINIX V5.23 has the wrong prototype for uname() */ | ||
20 | -extern int uname(); /* so we fix it :-) */ | ||
21 | +extern int uname(struct utsname *); | ||
22 | #define Uname(name) ((int(*)(struct utsname*))uname)(name) | ||
23 | #else | ||
24 | #define Uname(name) uname(name) /* no fix needed */ | ||
25 | -- | ||
26 | 2.43.0 | ||
27 | |||
diff --git a/meta-oe/recipes-support/procmail/procmail/CVE-2014-3618.patch b/meta-oe/recipes-support/procmail/procmail/CVE-2014-3618.patch new file mode 100644 index 0000000000..b041924361 --- /dev/null +++ b/meta-oe/recipes-support/procmail/procmail/CVE-2014-3618.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | Description: Fix heap-overflow in formail | ||
2 | CVE-2014-3618: Heap-overflow in formail when processing | ||
3 | specially-crafted email headers. | ||
4 | Origin: http://www.openwall.com/lists/oss-security/2014/09/03/8 | ||
5 | Bug-Debian: https://bugs.debian.org/704675 | ||
6 | Bug-Debian: https://bugs.debian.org/760443 | ||
7 | Forwarded: not-needed | ||
8 | Last-Update: 2014-09-04 | ||
9 | |||
10 | CVE: CVE-2014-3618 | ||
11 | Upstream-Status: Inactive-Upstream [lastrelease: 2001] | ||
12 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
13 | |||
14 | --- a/src/formisc.c | ||
15 | +++ b/src/formisc.c | ||
16 | @@ -84,12 +84,11 @@ normal: *target++= *start++; | ||
17 | case '"':*target++=delim='"';start++; | ||
18 | } | ||
19 | ;{ int i; | ||
20 | - do | ||
21 | + while(*start) | ||
22 | if((i= *target++= *start++)==delim) /* corresponding delimiter? */ | ||
23 | break; | ||
24 | else if(i=='\\'&&*start) /* skip quoted character */ | ||
25 | *target++= *start++; | ||
26 | - while(*start); /* anything? */ | ||
27 | } | ||
28 | hitspc=2; | ||
29 | } | ||
diff --git a/meta-oe/recipes-support/procmail/procmail/CVE-2017-16844.patch b/meta-oe/recipes-support/procmail/procmail/CVE-2017-16844.patch new file mode 100644 index 0000000000..6e04989c33 --- /dev/null +++ b/meta-oe/recipes-support/procmail/procmail/CVE-2017-16844.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | From: Santiago Vila <sanvila@debian.org> | ||
2 | Subject: Fix heap-based buffer overflow in loadbuf() | ||
3 | Bug-Debian: http://bugs.debian.org/876511 | ||
4 | X-Debian-version: 3.22-26 | ||
5 | |||
6 | CVE: CVE-2017-16844 | ||
7 | Upstream-Status: Inactive-Upstream [lastrelease: 2001] | ||
8 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
9 | |||
10 | --- a/src/formisc.c | ||
11 | +++ b/src/formisc.c | ||
12 | @@ -103,7 +103,7 @@ | ||
13 | } | ||
14 | /* append to buf */ | ||
15 | void loadbuf(text,len)const char*const text;const size_t len; | ||
16 | -{ if(buffilled+len>buflen) /* buf can't hold the text */ | ||
17 | +{ while(buffilled+len>buflen) /* buf can't hold the text */ | ||
18 | buf=realloc(buf,buflen+=Bsize); | ||
19 | tmemmove(buf+buffilled,text,len);buffilled+=len; | ||
20 | } | ||
diff --git a/meta-oe/recipes-support/procmail/procmail/gcc14.patch b/meta-oe/recipes-support/procmail/procmail/gcc14.patch new file mode 100644 index 0000000000..5ca56fa006 --- /dev/null +++ b/meta-oe/recipes-support/procmail/procmail/gcc14.patch | |||
@@ -0,0 +1,127 @@ | |||
1 | From: Santiago Vila <sanvila@debian.org> | ||
2 | Subject: Fix build with gcc-14 | ||
3 | Bug-Debian: https://bugs.debian.org/1075398 | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- a/initmake | ||
8 | +++ b/initmake | ||
9 | @@ -124,7 +124,7 @@ else | ||
10 | fi | ||
11 | |||
12 | cat >_autotst.c <<HERE | ||
13 | -main() | ||
14 | +int main() | ||
15 | { return 0; | ||
16 | } | ||
17 | HERE | ||
18 | @@ -200,7 +200,7 @@ cat >_autotst.c <<HERE | ||
19 | #include <sys/types.h> | ||
20 | #include <stdio.h> | ||
21 | #include <sys/stat.h> | ||
22 | -main() | ||
23 | +int main() | ||
24 | { struct stat buf;return!&buf; | ||
25 | } | ||
26 | HERE | ||
27 | --- a/src/autoconf | ||
28 | +++ b/src/autoconf | ||
29 | @@ -414,6 +414,12 @@ cat >_autotst.c <<HERE | ||
30 | int dolock,child[NR_of_forks],timeout,fdcollect; | ||
31 | char dirlocktest[]="_locktest"; | ||
32 | |||
33 | +#include <stdlib.h> | ||
34 | +int killchildren(); | ||
35 | +int fdlock(int fd); | ||
36 | +int sfdlock(int fd); | ||
37 | +int fdunlock(); | ||
38 | + | ||
39 | void stimeout() | ||
40 | { timeout=1;close(fdcollect);killchildren(); | ||
41 | } | ||
42 | @@ -435,7 +441,7 @@ unsigned sfork() | ||
43 | return pid; | ||
44 | } | ||
45 | |||
46 | -int main(argc,argv)char*argv[]; | ||
47 | +int main(int argc,char*argv[]) | ||
48 | { int goodlock,testlock,i,pip[2],pipw[2];time_t otimet;unsigned dtimet; | ||
49 | static char filename[]="_locktst.l0"; | ||
50 | close(0);goodlock=0;testlock=FIRST_lock;signal(SIGPIPE,SIG_DFL); | ||
51 | @@ -585,13 +591,13 @@ int killchildren() | ||
52 | return 0; | ||
53 | } | ||
54 | |||
55 | -int sfdlock(fd) | ||
56 | +int sfdlock(int fd) | ||
57 | { int i;unsigned gobble[GOBBLE>>2]; | ||
58 | for(i=GOBBLE>>2;i;gobble[--i]=~(unsigned)0); /* SunOS crash test */ | ||
59 | return fdlock(fd); | ||
60 | } | ||
61 | |||
62 | -static oldfdlock; | ||
63 | +static int oldfdlock; | ||
64 | #ifdef F_SETLKW | ||
65 | static struct flock flck; /* why can't it be a local variable? */ | ||
66 | #endif | ||
67 | @@ -599,7 +605,7 @@ static struct flock flck; /* why can't | ||
68 | static off_t oldlockoffset; | ||
69 | #endif | ||
70 | |||
71 | -int fdlock(fd) | ||
72 | +int fdlock(int fd) | ||
73 | { int i;unsigned gobble[GOBBLE>>2]; | ||
74 | for(i=GOBBLE>>2;i;gobble[--i]=~(unsigned)0); /* SunOS crash test */ | ||
75 | oldfdlock=fd;fd=0; | ||
76 | @@ -993,11 +999,11 @@ int main(){int i;i=1; | ||
77 | i+=WIFEXITED(i); | ||
78 | i+=WIFSTOPPED(i); | ||
79 | i+=WEXITSTATUS(i); | ||
80 | - i+=WSIGTERM(i); | ||
81 | + i+=WTERMSIG(i); | ||
82 | return i;} | ||
83 | HERE | ||
84 | |||
85 | -echo 'Testing for WIFEXITED(), WIFSTOPPED(), WEXITSTATUS() & WSIGTERM()' | ||
86 | +echo 'Testing for WIFEXITED(), WIFSTOPPED(), WEXITSTATUS() & WTERMSIG()' | ||
87 | if $MAKE _autotst.$O >_autotst.rrr 2>&1 | ||
88 | then | ||
89 | $FGREP -v include/ <_autotst.rrr >_autotst.$O | ||
90 | @@ -1029,6 +1035,8 @@ cat >_autotst.c <<HERE | ||
91 | #ifndef NO_COMSAT | ||
92 | #include "network.h" | ||
93 | #endif | ||
94 | +int setrgid(); | ||
95 | +int setresgid(); | ||
96 | int main(){char a[2]; | ||
97 | endpwent();endgrent();memmove(a,"0",1);bcopy("0",a,1);strcspn(a,"0"); | ||
98 | strtol("0",(char**)0,10);strchr("0",'0');strpbrk(a,"0");rename(a,"0"); | ||
99 | @@ -1059,7 +1067,7 @@ echo 'Testing for memmove, strchr, strpb | ||
100 | echo ' rename, setrgid, setegid, pow, opendir, mkdir, waitpid, fsync,' | ||
101 | echo ' ftruncate, strtod, strncasecmp, strerror, strlcat,' | ||
102 | echo ' memset, bzero, and _exit' | ||
103 | -if $MAKE _autotst.$O >$DEVNULL 2>&1 | ||
104 | +if $MAKE _autotst.$O >_autotst.rrr 2>&1 | ||
105 | then | ||
106 | : | ||
107 | else | ||
108 | @@ -1196,7 +1204,7 @@ unsigned long dobench(strstr,iter,haysta | ||
109 | return (unsigned long)clock()-to; | ||
110 | } | ||
111 | #endif | ||
112 | -int main(argc,argv)int argc;const char*argv[]; | ||
113 | +int main(int argc,const char*argv[]) | ||
114 | { if(argc==1) | ||
115 | { char*haystack; | ||
116 | #ifdef BENCHSIZE | ||
117 | --- a/src/mailfold.c | ||
118 | +++ b/src/mailfold.c | ||
119 | @@ -378,7 +378,7 @@ void concon(ch)const int ch; /* flip b | ||
120 | } | ||
121 | } | ||
122 | |||
123 | -void readmail(rhead,tobesent)const long tobesent; | ||
124 | +void readmail(int rhead,const long tobesent) | ||
125 | { char*chp,*pastend;static size_t contlengthoffset; | ||
126 | ;{ long dfilled; | ||
127 | if(rhead==2) /* already read, just examine what we have */ | ||
diff --git a/meta-oe/recipes-support/procmail/procmail_3.22.bb b/meta-oe/recipes-support/procmail/procmail_3.22.bb index 16917666a4..47c8310eaf 100644 --- a/meta-oe/recipes-support/procmail/procmail_3.22.bb +++ b/meta-oe/recipes-support/procmail/procmail_3.22.bb | |||
@@ -12,8 +12,13 @@ SRC_URI = "http://www.ring.gr.jp/archives/net/mail/${BPN}/${BP}.tar.gz \ | |||
12 | file://from-debian-to-fix-compile-errors.patch \ | 12 | file://from-debian-to-fix-compile-errors.patch \ |
13 | file://from-debian-to-modify-parameters.patch \ | 13 | file://from-debian-to-modify-parameters.patch \ |
14 | file://from-debian-to-fix-man-file.patch \ | 14 | file://from-debian-to-fix-man-file.patch \ |
15 | file://man-file-mailstat.1-from-debian.patch" | 15 | file://man-file-mailstat.1-from-debian.patch \ |
16 | SRC_URI[md5sum] = "1678ea99b973eb77eda4ecf6acae53f1" | 16 | file://CVE-2014-3618.patch \ |
17 | file://CVE-2017-16844.patch \ | ||
18 | file://gcc14.patch \ | ||
19 | file://0001-fix-uname-declaration.patch \ | ||
20 | file://0001-fix-too-many-arguments-issue.patch \ | ||
21 | " | ||
17 | SRC_URI[sha256sum] = "087c75b34dd33d8b9df5afe9e42801c9395f4bf373a784d9bc97153b0062e117" | 22 | SRC_URI[sha256sum] = "087c75b34dd33d8b9df5afe9e42801c9395f4bf373a784d9bc97153b0062e117" |
18 | 23 | ||
19 | LICENSE = "GPL-2.0-only & Artistic-1.0" | 24 | LICENSE = "GPL-2.0-only & Artistic-1.0" |
@@ -22,6 +27,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a71e50e197a992c862379e576e669757 \ | |||
22 | 27 | ||
23 | DEPENDS = "libnet" | 28 | DEPENDS = "libnet" |
24 | inherit autotools-brokensep | 29 | inherit autotools-brokensep |
30 | |||
25 | do_configure() { | 31 | do_configure() { |
26 | find examples -type f | xargs chmod 644 | 32 | find examples -type f | xargs chmod 644 |
27 | export CC="${BUILD_CC}" | 33 | export CC="${BUILD_CC}" |
@@ -33,7 +39,7 @@ do_configure() { | |||
33 | } | 39 | } |
34 | 40 | ||
35 | do_compile() { | 41 | do_compile() { |
36 | oe_runmake -i TARGET_CFLAGS="$TARGET_CFLAGS -Wno-comments -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" LDFLAGS0="${LDFLAGS}" | 42 | oe_runmake -i CFLAGS="$TARGET_CFLAGS -Wno-comments -Wno-implicit-int -Wno-implicit-function-declaration -Wno-incompatible-pointer-types -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" LDFLAGS0="${LDFLAGS}" |
37 | } | 43 | } |
38 | 44 | ||
39 | do_install() { | 45 | do_install() { |