idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
28,900
static struct buffer_head *udf_getblk(struct inode *inode, long block, int create, int *err) { struct buffer_head *bh; struct buffer_head dummy; dummy.b_state = 0; dummy.b_blocknr = -1000; *err = udf_get_block(inode, block, &dummy, create); if (!*err && buffer_mapped(&dummy)) { bh = sb_getblk(inode->...
DoS
0
static struct buffer_head *udf_getblk(struct inode *inode, long block, int create, int *err) { struct buffer_head *bh; struct buffer_head dummy; dummy.b_state = 0; dummy.b_blocknr = -1000; *err = udf_get_block(inode, block, &dummy, create); if (!*err && buffer_mapped(&dummy)) { bh = sb_getblk(inode->...
@@ -1270,6 +1270,13 @@ int udf_setsize(struct inode *inode, loff_t newsize) return 0; } +/* + * Maximum length of linked list formed by ICB hierarchy. The chosen number is + * arbitrary - just that we hopefully don't limit any real use of rewritten + * inode on write-once media but avoid looping for too long on co...
CWE-399
null
null
28,901
struct inode *udf_iget(struct super_block *sb, struct kernel_lb_addr *ino) { unsigned long block = udf_get_lb_pblock(sb, ino, 0); struct inode *inode = iget_locked(sb, block); if (!inode) return NULL; if (inode->i_state & I_NEW) { memcpy(&UDF_I(inode)->i_location, ino, sizeof(struct kernel_lb_addr)); __udf_...
DoS
0
struct inode *udf_iget(struct super_block *sb, struct kernel_lb_addr *ino) { unsigned long block = udf_get_lb_pblock(sb, ino, 0); struct inode *inode = iget_locked(sb, block); if (!inode) return NULL; if (inode->i_state & I_NEW) { memcpy(&UDF_I(inode)->i_location, ino, sizeof(struct kernel_lb_addr)); __udf_...
@@ -1270,6 +1270,13 @@ int udf_setsize(struct inode *inode, loff_t newsize) return 0; } +/* + * Maximum length of linked list formed by ICB hierarchy. The chosen number is + * arbitrary - just that we hopefully don't limit any real use of rewritten + * inode on write-once media but avoid looping for too long on co...
CWE-399
null
null
28,902
static int8_t udf_insert_aext(struct inode *inode, struct extent_position epos, struct kernel_lb_addr neloc, uint32_t nelen) { struct kernel_lb_addr oeloc; uint32_t oelen; int8_t etype; if (epos.bh) get_bh(epos.bh); while ((etype = udf_next_aext(inode, &epos, &oeloc, &oelen, 0)) != -1) { udf_write_a...
DoS
0
static int8_t udf_insert_aext(struct inode *inode, struct extent_position epos, struct kernel_lb_addr neloc, uint32_t nelen) { struct kernel_lb_addr oeloc; uint32_t oelen; int8_t etype; if (epos.bh) get_bh(epos.bh); while ((etype = udf_next_aext(inode, &epos, &oeloc, &oelen, 0)) != -1) { udf_write_a...
@@ -1270,6 +1270,13 @@ int udf_setsize(struct inode *inode, loff_t newsize) return 0; } +/* + * Maximum length of linked list formed by ICB hierarchy. The chosen number is + * arbitrary - just that we hopefully don't limit any real use of rewritten + * inode on write-once media but avoid looping for too long on co...
CWE-399
null
null
28,903
static void udf_merge_extents(struct inode *inode, struct kernel_long_ad laarr[EXTENT_MERGE_SIZE], int *endnum) { int i; unsigned long blocksize = inode->i_sb->s_blocksize; unsigned char blocksize_bits = inode->i_sb->s_blocksize_bits; for (i = 0; i < (*endnum - 1); i++) { struct kernel_long_ad ...
DoS
0
static void udf_merge_extents(struct inode *inode, struct kernel_long_ad laarr[EXTENT_MERGE_SIZE], int *endnum) { int i; unsigned long blocksize = inode->i_sb->s_blocksize; unsigned char blocksize_bits = inode->i_sb->s_blocksize_bits; for (i = 0; i < (*endnum - 1); i++) { struct kernel_long_ad ...
@@ -1270,6 +1270,13 @@ int udf_setsize(struct inode *inode, loff_t newsize) return 0; } +/* + * Maximum length of linked list formed by ICB hierarchy. The chosen number is + * arbitrary - just that we hopefully don't limit any real use of rewritten + * inode on write-once media but avoid looping for too long on co...
CWE-399
null
null
28,904
int8_t udf_next_aext(struct inode *inode, struct extent_position *epos, struct kernel_lb_addr *eloc, uint32_t *elen, int inc) { int8_t etype; while ((etype = udf_current_aext(inode, epos, eloc, elen, inc)) == (EXT_NEXT_EXTENT_ALLOCDECS >> 30)) { int block; epos->block = *eloc; epos->offset = siz...
DoS
0
int8_t udf_next_aext(struct inode *inode, struct extent_position *epos, struct kernel_lb_addr *eloc, uint32_t *elen, int inc) { int8_t etype; while ((etype = udf_current_aext(inode, epos, eloc, elen, inc)) == (EXT_NEXT_EXTENT_ALLOCDECS >> 30)) { int block; epos->block = *eloc; epos->offset = siz...
@@ -1270,6 +1270,13 @@ int udf_setsize(struct inode *inode, loff_t newsize) return 0; } +/* + * Maximum length of linked list formed by ICB hierarchy. The chosen number is + * arbitrary - just that we hopefully don't limit any real use of rewritten + * inode on write-once media but avoid looping for too long on co...
CWE-399
null
null
28,905
static int udf_readpage(struct file *file, struct page *page) { return mpage_readpage(page, udf_get_block); }
DoS
0
static int udf_readpage(struct file *file, struct page *page) { return mpage_readpage(page, udf_get_block); }
@@ -1270,6 +1270,13 @@ int udf_setsize(struct inode *inode, loff_t newsize) return 0; } +/* + * Maximum length of linked list formed by ICB hierarchy. The chosen number is + * arbitrary - just that we hopefully don't limit any real use of rewritten + * inode on write-once media but avoid looping for too long on co...
CWE-399
null
null
28,906
static void udf_split_extents(struct inode *inode, int *c, int offset, int newblocknum, struct kernel_long_ad laarr[EXTENT_MERGE_SIZE], int *endnum) { unsigned long blocksize = inode->i_sb->s_blocksize; unsigned char blocksize_bits = inode->i_sb->s_blocksize_bits; if ((laarr[*c].extLength...
DoS
0
static void udf_split_extents(struct inode *inode, int *c, int offset, int newblocknum, struct kernel_long_ad laarr[EXTENT_MERGE_SIZE], int *endnum) { unsigned long blocksize = inode->i_sb->s_blocksize; unsigned char blocksize_bits = inode->i_sb->s_blocksize_bits; if ((laarr[*c].extLength...
@@ -1270,6 +1270,13 @@ int udf_setsize(struct inode *inode, loff_t newsize) return 0; } +/* + * Maximum length of linked list formed by ICB hierarchy. The chosen number is + * arbitrary - just that we hopefully don't limit any real use of rewritten + * inode on write-once media but avoid looping for too long on co...
CWE-399
null
null
28,907
static int udf_sync_inode(struct inode *inode) { return udf_update_inode(inode, 1); }
DoS
0
static int udf_sync_inode(struct inode *inode) { return udf_update_inode(inode, 1); }
@@ -1270,6 +1270,13 @@ int udf_setsize(struct inode *inode, loff_t newsize) return 0; } +/* + * Maximum length of linked list formed by ICB hierarchy. The chosen number is + * arbitrary - just that we hopefully don't limit any real use of rewritten + * inode on write-once media but avoid looping for too long on co...
CWE-399
null
null
28,908
static void udf_update_extent_cache(struct inode *inode, loff_t estart, struct extent_position *pos, int next_epos) { struct udf_inode_info *iinfo = UDF_I(inode); spin_lock(&iinfo->i_extent_cache_lock); /* Invalidate previously cached extent */ __udf_clear_extent_cache(inode); if (pos->bh) get_bh(pos->b...
DoS
0
static void udf_update_extent_cache(struct inode *inode, loff_t estart, struct extent_position *pos, int next_epos) { struct udf_inode_info *iinfo = UDF_I(inode); spin_lock(&iinfo->i_extent_cache_lock); /* Invalidate previously cached extent */ __udf_clear_extent_cache(inode); if (pos->bh) get_bh(pos->b...
@@ -1270,6 +1270,13 @@ int udf_setsize(struct inode *inode, loff_t newsize) return 0; } +/* + * Maximum length of linked list formed by ICB hierarchy. The chosen number is + * arbitrary - just that we hopefully don't limit any real use of rewritten + * inode on write-once media but avoid looping for too long on co...
CWE-399
null
null
28,909
static void udf_update_extents(struct inode *inode, struct kernel_long_ad laarr[EXTENT_MERGE_SIZE], int startnum, int endnum, struct extent_position *epos) { int start = 0, i; struct kernel_lb_addr tmploc; uint32_t tmplen; if (startnum > endnum) { for (i = 0; i < (startnum - endnum)...
DoS
0
static void udf_update_extents(struct inode *inode, struct kernel_long_ad laarr[EXTENT_MERGE_SIZE], int startnum, int endnum, struct extent_position *epos) { int start = 0, i; struct kernel_lb_addr tmploc; uint32_t tmplen; if (startnum > endnum) { for (i = 0; i < (startnum - endnum)...
@@ -1270,6 +1270,13 @@ int udf_setsize(struct inode *inode, loff_t newsize) return 0; } +/* + * Maximum length of linked list formed by ICB hierarchy. The chosen number is + * arbitrary - just that we hopefully don't limit any real use of rewritten + * inode on write-once media but avoid looping for too long on co...
CWE-399
null
null
28,910
static int udf_update_inode(struct inode *inode, int do_sync) { struct buffer_head *bh = NULL; struct fileEntry *fe; struct extendedFileEntry *efe; uint64_t lb_recorded; uint32_t udfperms; uint16_t icbflags; uint16_t crclen; int err = 0; struct udf_sb_info *sbi = UDF_SB(inode->i_sb); unsigned char blocksize_b...
DoS
0
static int udf_update_inode(struct inode *inode, int do_sync) { struct buffer_head *bh = NULL; struct fileEntry *fe; struct extendedFileEntry *efe; uint64_t lb_recorded; uint32_t udfperms; uint16_t icbflags; uint16_t crclen; int err = 0; struct udf_sb_info *sbi = UDF_SB(inode->i_sb); unsigned char blocksize_b...
@@ -1270,6 +1270,13 @@ int udf_setsize(struct inode *inode, loff_t newsize) return 0; } +/* + * Maximum length of linked list formed by ICB hierarchy. The chosen number is + * arbitrary - just that we hopefully don't limit any real use of rewritten + * inode on write-once media but avoid looping for too long on co...
CWE-399
null
null
28,911
void udf_write_aext(struct inode *inode, struct extent_position *epos, struct kernel_lb_addr *eloc, uint32_t elen, int inc) { int adsize; uint8_t *ptr; struct short_ad *sad; struct long_ad *lad; struct udf_inode_info *iinfo = UDF_I(inode); if (!epos->bh) ptr = iinfo->i_ext.i_data + epos->offset - udf_...
DoS
0
void udf_write_aext(struct inode *inode, struct extent_position *epos, struct kernel_lb_addr *eloc, uint32_t elen, int inc) { int adsize; uint8_t *ptr; struct short_ad *sad; struct long_ad *lad; struct udf_inode_info *iinfo = UDF_I(inode); if (!epos->bh) ptr = iinfo->i_ext.i_data + epos->offset - udf_...
@@ -1270,6 +1270,13 @@ int udf_setsize(struct inode *inode, loff_t newsize) return 0; } +/* + * Maximum length of linked list formed by ICB hierarchy. The chosen number is + * arbitrary - just that we hopefully don't limit any real use of rewritten + * inode on write-once media but avoid looping for too long on co...
CWE-399
null
null
28,912
static void udf_write_failed(struct address_space *mapping, loff_t to) { struct inode *inode = mapping->host; struct udf_inode_info *iinfo = UDF_I(inode); loff_t isize = inode->i_size; if (to > isize) { truncate_pagecache(inode, isize); if (iinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB) { down_write(&iinfo->...
DoS
0
static void udf_write_failed(struct address_space *mapping, loff_t to) { struct inode *inode = mapping->host; struct udf_inode_info *iinfo = UDF_I(inode); loff_t isize = inode->i_size; if (to > isize) { truncate_pagecache(inode, isize); if (iinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB) { down_write(&iinfo->...
@@ -1270,6 +1270,13 @@ int udf_setsize(struct inode *inode, loff_t newsize) return 0; } +/* + * Maximum length of linked list formed by ICB hierarchy. The chosen number is + * arbitrary - just that we hopefully don't limit any real use of rewritten + * inode on write-once media but avoid looping for too long on co...
CWE-399
null
null
28,913
static int udf_writepage(struct page *page, struct writeback_control *wbc) { return block_write_full_page(page, udf_get_block, wbc); }
DoS
0
static int udf_writepage(struct page *page, struct writeback_control *wbc) { return block_write_full_page(page, udf_get_block, wbc); }
@@ -1270,6 +1270,13 @@ int udf_setsize(struct inode *inode, loff_t newsize) return 0; } +/* + * Maximum length of linked list formed by ICB hierarchy. The chosen number is + * arbitrary - just that we hopefully don't limit any real use of rewritten + * inode on write-once media but avoid looping for too long on co...
CWE-399
null
null
28,914
static int udf_writepages(struct address_space *mapping, struct writeback_control *wbc) { return mpage_writepages(mapping, wbc, udf_get_block); }
DoS
0
static int udf_writepages(struct address_space *mapping, struct writeback_control *wbc) { return mpage_writepages(mapping, wbc, udf_get_block); }
@@ -1270,6 +1270,13 @@ int udf_setsize(struct inode *inode, loff_t newsize) return 0; } +/* + * Maximum length of linked list formed by ICB hierarchy. The chosen number is + * arbitrary - just that we hopefully don't limit any real use of rewritten + * inode on write-once media but avoid looping for too long on co...
CWE-399
null
null
28,915
static inline void hex_encode(unsigned char *str, int len, unsigned char *out) { int i; for (i = 0; i < len; ++i) { out[0] = itoa16[str[i]>>4]; out[1] = itoa16[str[i]&0xF]; out += 2; } }
DoS Exec Code Overflow
0
static inline void hex_encode(unsigned char *str, int len, unsigned char *out) { int i; for (i = 0; i < len; ++i) { out[0] = itoa16[str[i]>>4]; out[1] = itoa16[str[i]&0xF]; out += 2; } }
@@ -39,7 +39,7 @@ struct postgresql_status { u_char status; u_char user[65]; u_char type; - u_char password[65]; + u_char password[66]; u_char hash[33]; u_char salt[9]; u_char database[65]; @@ -157,8 +157,12 @@ FUNC_DECODER(dissector_postgresql) int length; DE...
CWE-119
null
null
28,916
void __init postgresql_init(void) { dissect_add("postgresql", APP_LAYER_TCP, 5432, dissector_postgresql); }
DoS Exec Code Overflow
0
void __init postgresql_init(void) { dissect_add("postgresql", APP_LAYER_TCP, 5432, dissector_postgresql); }
@@ -39,7 +39,7 @@ struct postgresql_status { u_char status; u_char user[65]; u_char type; - u_char password[65]; + u_char password[66]; u_char hash[33]; u_char salt[9]; u_char database[65]; @@ -157,8 +157,12 @@ FUNC_DECODER(dissector_postgresql) int length; DE...
CWE-119
null
null
28,917
static sector_t _isofs_bmap(struct address_space *mapping, sector_t block) { return generic_block_bmap(mapping,block,isofs_get_block); }
DoS
0
static sector_t _isofs_bmap(struct address_space *mapping, sector_t block) { return generic_block_bmap(mapping,block,isofs_get_block); }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,918
static void destroy_inodecache(void) { /* * Make sure all delayed rcu free inodes are flushed before we * destroy cache. */ rcu_barrier(); kmem_cache_destroy(isofs_inode_cachep); }
DoS
0
static void destroy_inodecache(void) { /* * Make sure all delayed rcu free inodes are flushed before we * destroy cache. */ rcu_barrier(); kmem_cache_destroy(isofs_inode_cachep); }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,919
static void __exit exit_iso9660_fs(void) { unregister_filesystem(&iso9660_fs_type); #ifdef CONFIG_ZISOFS zisofs_cleanup(); #endif destroy_inodecache(); }
DoS
0
static void __exit exit_iso9660_fs(void) { unregister_filesystem(&iso9660_fs_type); #ifdef CONFIG_ZISOFS zisofs_cleanup(); #endif destroy_inodecache(); }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,920
static int __init init_inodecache(void) { isofs_inode_cachep = kmem_cache_create("isofs_inode_cache", sizeof(struct iso_inode_info), 0, (SLAB_RECLAIM_ACCOUNT| SLAB_MEM_SPREAD), init_once); if (isofs_inode_cachep == NULL) return -ENOMEM; return 0; }
DoS
0
static int __init init_inodecache(void) { isofs_inode_cachep = kmem_cache_create("isofs_inode_cache", sizeof(struct iso_inode_info), 0, (SLAB_RECLAIM_ACCOUNT| SLAB_MEM_SPREAD), init_once); if (isofs_inode_cachep == NULL) return -ENOMEM; return 0; }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,921
static struct inode *isofs_alloc_inode(struct super_block *sb) { struct iso_inode_info *ei; ei = kmem_cache_alloc(isofs_inode_cachep, GFP_KERNEL); if (!ei) return NULL; return &ei->vfs_inode; }
DoS
0
static struct inode *isofs_alloc_inode(struct super_block *sb) { struct iso_inode_info *ei; ei = kmem_cache_alloc(isofs_inode_cachep, GFP_KERNEL); if (!ei) return NULL; return &ei->vfs_inode; }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,922
static int isofs_bmap(struct inode *inode, sector_t block) { struct buffer_head dummy; int error; dummy.b_state = 0; dummy.b_blocknr = -1000; error = isofs_get_block(inode, block, &dummy, 0); if (!error) return dummy.b_blocknr; return 0; }
DoS
0
static int isofs_bmap(struct inode *inode, sector_t block) { struct buffer_head dummy; int error; dummy.b_state = 0; dummy.b_blocknr = -1000; error = isofs_get_block(inode, block, &dummy, 0); if (!error) return dummy.b_blocknr; return 0; }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,923
struct buffer_head *isofs_bread(struct inode *inode, sector_t block) { sector_t blknr = isofs_bmap(inode, block); if (!blknr) return NULL; return sb_bread(inode->i_sb, blknr); }
DoS
0
struct buffer_head *isofs_bread(struct inode *inode, sector_t block) { sector_t blknr = isofs_bmap(inode, block); if (!blknr) return NULL; return sb_bread(inode->i_sb, blknr); }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,924
isofs_dentry_cmp(const struct dentry *parent, const struct dentry *dentry, unsigned int len, const char *str, const struct qstr *name) { return isofs_dentry_cmp_common(len, str, name, 0, 0); }
DoS
0
isofs_dentry_cmp(const struct dentry *parent, const struct dentry *dentry, unsigned int len, const char *str, const struct qstr *name) { return isofs_dentry_cmp_common(len, str, name, 0, 0); }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,925
static int isofs_dentry_cmp_common( unsigned int len, const char *str, const struct qstr *name, int ms, int ci) { int alen, blen; /* A filename cannot end in '.' or we treat it like it has none */ alen = name->len; blen = len; if (ms) { while (alen && name->name[alen-1] == '.') alen--; while (blen && s...
DoS
0
static int isofs_dentry_cmp_common( unsigned int len, const char *str, const struct qstr *name, int ms, int ci) { int alen, blen; /* A filename cannot end in '.' or we treat it like it has none */ alen = name->len; blen = len; if (ms) { while (alen && name->name[alen-1] == '.') alen--; while (blen && s...
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,926
isofs_dentry_cmpi(const struct dentry *parent, const struct dentry *dentry, unsigned int len, const char *str, const struct qstr *name) { return isofs_dentry_cmp_common(len, str, name, 0, 1); }
DoS
0
isofs_dentry_cmpi(const struct dentry *parent, const struct dentry *dentry, unsigned int len, const char *str, const struct qstr *name) { return isofs_dentry_cmp_common(len, str, name, 0, 1); }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,927
isofs_dentry_cmpi_ms(const struct dentry *parent, const struct dentry *dentry, unsigned int len, const char *str, const struct qstr *name) { return isofs_dentry_cmp_common(len, str, name, 1, 1); }
DoS
0
isofs_dentry_cmpi_ms(const struct dentry *parent, const struct dentry *dentry, unsigned int len, const char *str, const struct qstr *name) { return isofs_dentry_cmp_common(len, str, name, 1, 1); }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,928
static void isofs_destroy_inode(struct inode *inode) { call_rcu(&inode->i_rcu, isofs_i_callback); }
DoS
0
static void isofs_destroy_inode(struct inode *inode) { call_rcu(&inode->i_rcu, isofs_i_callback); }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,929
static int isofs_fill_super(struct super_block *s, void *data, int silent) { struct buffer_head *bh = NULL, *pri_bh = NULL; struct hs_primary_descriptor *h_pri = NULL; struct iso_primary_descriptor *pri = NULL; struct iso_supplementary_descriptor *sec = NULL; struct iso_directory_record *rootp; struct inode *inod...
DoS
0
static int isofs_fill_super(struct super_block *s, void *data, int silent) { struct buffer_head *bh = NULL, *pri_bh = NULL; struct hs_primary_descriptor *h_pri = NULL; struct iso_primary_descriptor *pri = NULL; struct iso_supplementary_descriptor *sec = NULL; struct iso_directory_record *rootp; struct inode *inod...
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,930
static int isofs_get_block(struct inode *inode, sector_t iblock, struct buffer_head *bh_result, int create) { int ret; if (create) { printk(KERN_DEBUG "%s: Kernel tries to allocate a block\n", __func__); return -EROFS; } ret = isofs_get_blocks(inode, iblock, &bh_result, 1); return ret < 0 ? ret : 0; }
DoS
0
static int isofs_get_block(struct inode *inode, sector_t iblock, struct buffer_head *bh_result, int create) { int ret; if (create) { printk(KERN_DEBUG "%s: Kernel tries to allocate a block\n", __func__); return -EROFS; } ret = isofs_get_blocks(inode, iblock, &bh_result, 1); return ret < 0 ? ret : 0; }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,931
isofs_hash_common(struct qstr *qstr, int ms) { const char *name; int len; len = qstr->len; name = qstr->name; if (ms) { while (len && name[len-1] == '.') len--; } qstr->hash = full_name_hash(name, len); return 0; }
DoS
0
isofs_hash_common(struct qstr *qstr, int ms) { const char *name; int len; len = qstr->len; name = qstr->name; if (ms) { while (len && name[len-1] == '.') len--; } qstr->hash = full_name_hash(name, len); return 0; }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,932
isofs_hash_ms(const struct dentry *dentry, struct qstr *qstr) { return isofs_hash_common(qstr, 1); }
DoS
0
isofs_hash_ms(const struct dentry *dentry, struct qstr *qstr) { return isofs_hash_common(qstr, 1); }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,933
isofs_hashi(const struct dentry *dentry, struct qstr *qstr) { return isofs_hashi_common(qstr, 0); }
DoS
0
isofs_hashi(const struct dentry *dentry, struct qstr *qstr) { return isofs_hashi_common(qstr, 0); }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,934
isofs_hashi_common(struct qstr *qstr, int ms) { const char *name; int len; char c; unsigned long hash; len = qstr->len; name = qstr->name; if (ms) { while (len && name[len-1] == '.') len--; } hash = init_name_hash(); while (len--) { c = tolower(*name++); hash = partial_name_hash(c, hash); } qstr-...
DoS
0
isofs_hashi_common(struct qstr *qstr, int ms) { const char *name; int len; char c; unsigned long hash; len = qstr->len; name = qstr->name; if (ms) { while (len && name[len-1] == '.') len--; } hash = init_name_hash(); while (len--) { c = tolower(*name++); hash = partial_name_hash(c, hash); } qstr-...
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,935
isofs_hashi_ms(const struct dentry *dentry, struct qstr *qstr) { return isofs_hashi_common(qstr, 1); }
DoS
0
isofs_hashi_ms(const struct dentry *dentry, struct qstr *qstr) { return isofs_hashi_common(qstr, 1); }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,936
static void isofs_i_callback(struct rcu_head *head) { struct inode *inode = container_of(head, struct inode, i_rcu); kmem_cache_free(isofs_inode_cachep, ISOFS_I(inode)); }
DoS
0
static void isofs_i_callback(struct rcu_head *head) { struct inode *inode = container_of(head, struct inode, i_rcu); kmem_cache_free(isofs_inode_cachep, ISOFS_I(inode)); }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,937
static int isofs_iget5_set(struct inode *ino, void *data) { struct iso_inode_info *i = ISOFS_I(ino); struct isofs_iget5_callback_data *d = (struct isofs_iget5_callback_data*)data; i->i_iget5_block = d->block; i->i_iget5_offset = d->offset; return 0; }
DoS
0
static int isofs_iget5_set(struct inode *ino, void *data) { struct iso_inode_info *i = ISOFS_I(ino); struct isofs_iget5_callback_data *d = (struct isofs_iget5_callback_data*)data; i->i_iget5_block = d->block; i->i_iget5_offset = d->offset; return 0; }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,938
static struct dentry *isofs_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) { /* We don't support read-write mounts */ if (!(flags & MS_RDONLY)) return ERR_PTR(-EACCES); return mount_bdev(fs_type, flags, dev_name, data, isofs_fill_super); }
DoS
0
static struct dentry *isofs_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) { /* We don't support read-write mounts */ if (!(flags & MS_RDONLY)) return ERR_PTR(-EACCES); return mount_bdev(fs_type, flags, dev_name, data, isofs_fill_super); }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,939
static void isofs_put_super(struct super_block *sb) { struct isofs_sb_info *sbi = ISOFS_SB(sb); #ifdef CONFIG_JOLIET unload_nls(sbi->s_nls_iocharset); #endif kfree(sbi); sb->s_fs_info = NULL; return; }
DoS
0
static void isofs_put_super(struct super_block *sb) { struct isofs_sb_info *sbi = ISOFS_SB(sb); #ifdef CONFIG_JOLIET unload_nls(sbi->s_nls_iocharset); #endif kfree(sbi); sb->s_fs_info = NULL; return; }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,940
static int isofs_read_level3_size(struct inode *inode) { unsigned long bufsize = ISOFS_BUFFER_SIZE(inode); int high_sierra = ISOFS_SB(inode->i_sb)->s_high_sierra; struct buffer_head *bh = NULL; unsigned long block, offset, block_saved, offset_saved; int i = 0; int more_entries = 0; struct iso_directory_record *t...
DoS
0
static int isofs_read_level3_size(struct inode *inode) { unsigned long bufsize = ISOFS_BUFFER_SIZE(inode); int high_sierra = ISOFS_SB(inode->i_sb)->s_high_sierra; struct buffer_head *bh = NULL; unsigned long block, offset, block_saved, offset_saved; int i = 0; int more_entries = 0; struct iso_directory_record *t...
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,941
static int isofs_readpage(struct file *file, struct page *page) { return mpage_readpage(page, isofs_get_block); }
DoS
0
static int isofs_readpage(struct file *file, struct page *page) { return mpage_readpage(page, isofs_get_block); }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,942
static int isofs_remount(struct super_block *sb, int *flags, char *data) { sync_filesystem(sb); if (!(*flags & MS_RDONLY)) return -EROFS; return 0; }
DoS
0
static int isofs_remount(struct super_block *sb, int *flags, char *data) { sync_filesystem(sb); if (!(*flags & MS_RDONLY)) return -EROFS; return 0; }
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,943
static int parse_options(char *options, struct iso9660_options *popt) { char *p; int option; popt->map = 'n'; popt->rock = 1; popt->joliet = 1; popt->cruft = 0; popt->hide = 0; popt->showassoc = 0; popt->check = 'u'; /* unset */ popt->nocompress = 0; popt->blocksize = 1024; popt->fmode = popt->dmode = ISO...
DoS
0
static int parse_options(char *options, struct iso9660_options *popt) { char *p; int option; popt->map = 'n'; popt->rock = 1; popt->joliet = 1; popt->cruft = 0; popt->hide = 0; popt->showassoc = 0; popt->check = 'u'; /* unset */ popt->nocompress = 0; popt->blocksize = 1024; popt->fmode = popt->dmode = ISO...
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,944
static bool rootdir_empty(struct super_block *sb, unsigned long block) { int offset = 0, files = 0, de_len; struct iso_directory_record *de; struct buffer_head *bh; bh = sb_bread(sb, block); if (!bh) return true; while (files < 3) { de = (struct iso_directory_record *) (bh->b_data + offset); de_len = *(uns...
DoS
0
static bool rootdir_empty(struct super_block *sb, unsigned long block) { int offset = 0, files = 0, de_len; struct iso_directory_record *de; struct buffer_head *bh; bh = sb_bread(sb, block); if (!bh) return true; while (files < 3) { de = (struct iso_directory_record *) (bh->b_data + offset); de_len = *(uns...
@@ -61,7 +61,7 @@ static void isofs_put_super(struct super_block *sb) return; } -static int isofs_read_inode(struct inode *); +static int isofs_read_inode(struct inode *, int relocated); static int isofs_statfs (struct dentry *, struct kstatfs *); static struct kmem_cache *isofs_inode_cachep; @@ -1259,7 +1259,...
CWE-20
null
null
28,945
static char *get_symlink_chunk(char *rpnt, struct rock_ridge *rr, char *plimit) { int slen; int rootflag; struct SL_component *oldslp; struct SL_component *slp; slen = rr->len - 5; slp = &rr->u.SL.link; while (slen > 1) { rootflag = 0; switch (slp->flags & ~1) { case 0: if (slp->len > plimit - rpnt) ...
DoS
0
static char *get_symlink_chunk(char *rpnt, struct rock_ridge *rr, char *plimit) { int slen; int rootflag; struct SL_component *oldslp; struct SL_component *slp; slen = rr->len - 5; slp = &rr->u.SL.link; while (slen > 1) { rootflag = 0; switch (slp->flags & ~1) { case 0: if (slp->len > plimit - rpnt) ...
@@ -288,12 +288,16 @@ int get_rock_ridge_filename(struct iso_directory_record *de, goto out; } +#define RR_REGARD_XA 1 +#define RR_RELOC_DE 2 + static int parse_rock_ridge_inode_internal(struct iso_directory_record *de, - struct inode *inode, int regard_xa) + struct inode *inode, int flags) { int symlin...
CWE-20
null
null
28,946
asn1_decode_sequence_of_keys(krb5_data *in, krb5_key_data **out, krb5_int16 *n_key_data, krb5_kvno *mkvno) { krb5_error_code err; ldap_seqof_key_data *p; int i; /* * This should be pushed back into other library initialization * code. */ err = kldap_ensur...
DoS
0
asn1_decode_sequence_of_keys(krb5_data *in, krb5_key_data **out, krb5_int16 *n_key_data, krb5_kvno *mkvno) { krb5_error_code err; ldap_seqof_key_data *p; int i; /* * This should be pushed back into other library initialization * code. */ err = kldap_ensur...
@@ -406,14 +406,14 @@ krb5_encode_krbsecretkey(krb5_key_data *key_data_in, int n_key_data, int num_versions = 1; int i, j, last; krb5_error_code err = 0; - krb5_key_data *key_data; + krb5_key_data *key_data = NULL; - if (n_key_data <= 0) + if (n_key_data < 0) return NULL; /*...
null
null
null
28,947
asn1_encode_sequence_of_keys(krb5_key_data *key_data, krb5_int16 n_key_data, krb5_int32 mkvno, krb5_data **code) { krb5_error_code err; ldap_seqof_key_data val; /* * This should be pushed back into other library initialization * code. */ err = kldap_ensure_in...
DoS
0
asn1_encode_sequence_of_keys(krb5_key_data *key_data, krb5_int16 n_key_data, krb5_int32 mkvno, krb5_data **code) { krb5_error_code err; ldap_seqof_key_data val; /* * This should be pushed back into other library initialization * code. */ err = kldap_ensure_in...
@@ -406,14 +406,14 @@ krb5_encode_krbsecretkey(krb5_key_data *key_data_in, int n_key_data, int num_versions = 1; int i, j, last; krb5_error_code err = 0; - krb5_key_data *key_data; + krb5_key_data *key_data = NULL; - if (n_key_data <= 0) + if (n_key_data < 0) return NULL; /*...
null
null
null
28,948
berval2tl_data(struct berval *in, krb5_tl_data **out) { *out = (krb5_tl_data *) malloc (sizeof (krb5_tl_data)); if (*out == NULL) return ENOMEM; (*out)->tl_data_length = in->bv_len - 2; (*out)->tl_data_contents = (krb5_octet *) malloc ((*out)->tl_data_length * sizeof (krb5_octet)); ...
DoS
0
berval2tl_data(struct berval *in, krb5_tl_data **out) { *out = (krb5_tl_data *) malloc (sizeof (krb5_tl_data)); if (*out == NULL) return ENOMEM; (*out)->tl_data_length = in->bv_len - 2; (*out)->tl_data_contents = (krb5_octet *) malloc ((*out)->tl_data_length * sizeof (krb5_octet)); ...
@@ -406,14 +406,14 @@ krb5_encode_krbsecretkey(krb5_key_data *key_data_in, int n_key_data, int num_versions = 1; int i, j, last; krb5_error_code err = 0; - krb5_key_data *key_data; + krb5_key_data *key_data = NULL; - if (n_key_data <= 0) + if (n_key_data < 0) return NULL; /*...
null
null
null
28,949
free_xargs(xargs_t xargs) { if (xargs.dn) free (xargs.dn); if (xargs.linkdn) free(xargs.linkdn); if (xargs.containerdn) free (xargs.containerdn); if (xargs.tktpolicydn) free (xargs.tktpolicydn); }
DoS
0
free_xargs(xargs_t xargs) { if (xargs.dn) free (xargs.dn); if (xargs.linkdn) free(xargs.linkdn); if (xargs.containerdn) free (xargs.containerdn); if (xargs.tktpolicydn) free (xargs.tktpolicydn); }
@@ -406,14 +406,14 @@ krb5_encode_krbsecretkey(krb5_key_data *key_data_in, int n_key_data, int num_versions = 1; int i, j, last; krb5_error_code err = 0; - krb5_key_data *key_data; + krb5_key_data *key_data = NULL; - if (n_key_data <= 0) + if (n_key_data < 0) return NULL; /*...
null
null
null
28,950
getstringtime(krb5_timestamp epochtime) { struct tm tme; char *strtime=NULL; time_t posixtime = epochtime; strtime = calloc (50, 1); if (strtime == NULL) return NULL; if (gmtime_r(&posixtime, &tme) == NULL) return NULL; strftime(strtim...
DoS
0
getstringtime(krb5_timestamp epochtime) { struct tm tme; char *strtime=NULL; time_t posixtime = epochtime; strtime = calloc (50, 1); if (strtime == NULL) return NULL; if (gmtime_r(&posixtime, &tme) == NULL) return NULL; strftime(strtim...
@@ -406,14 +406,14 @@ krb5_encode_krbsecretkey(krb5_key_data *key_data_in, int n_key_data, int num_versions = 1; int i, j, last; krb5_error_code err = 0; - krb5_key_data *key_data; + krb5_key_data *key_data = NULL; - if (n_key_data <= 0) + if (n_key_data < 0) return NULL; /*...
null
null
null
28,951
krb5_decode_krbsecretkey(krb5_context context, krb5_db_entry *entries, struct berval **bvalues, krb5_tl_data *userinfo_tl_data, krb5_kvno *mkvno) { char *user=NULL; int i=0, j=0, noofkeys=0; krb5_key_data ...
DoS
0
krb5_decode_krbsecretkey(krb5_context context, krb5_db_entry *entries, struct berval **bvalues, krb5_tl_data *userinfo_tl_data, krb5_kvno *mkvno) { char *user=NULL; int i=0, j=0, noofkeys=0; krb5_key_data ...
@@ -406,14 +406,14 @@ krb5_encode_krbsecretkey(krb5_key_data *key_data_in, int n_key_data, int num_versions = 1; int i, j, last; krb5_error_code err = 0; - krb5_key_data *key_data; + krb5_key_data *key_data = NULL; - if (n_key_data <= 0) + if (n_key_data < 0) return NULL; /*...
null
null
null
28,952
krb5_ldap_get_principal(krb5_context context, krb5_const_principal searchfor, unsigned int flags, krb5_db_entry **entry_ptr) { char *user=NULL, *filter=NULL, *filtuser=NULL; unsigned int tree=0, ntrees=1, princlen=0; krb5_error_code t...
DoS
0
krb5_ldap_get_principal(krb5_context context, krb5_const_principal searchfor, unsigned int flags, krb5_db_entry **entry_ptr) { char *user=NULL, *filter=NULL, *filtuser=NULL; unsigned int tree=0, ntrees=1, princlen=0; krb5_error_code t...
@@ -406,14 +406,14 @@ krb5_encode_krbsecretkey(krb5_key_data *key_data_in, int n_key_data, int num_versions = 1; int i, j, last; krb5_error_code err = 0; - krb5_key_data *key_data; + krb5_key_data *key_data = NULL; - if (n_key_data <= 0) + if (n_key_data < 0) return NULL; /*...
null
null
null
28,953
krb5_read_tkt_policy(krb5_context context, krb5_ldap_context *ldap_context, krb5_db_entry *entries, char *policy) { krb5_error_code st=0; int mask=0, omask=0; int tkt_mask=(KDB_MAX_LIFE_ATTR | KDB_MAX_RLIFE_ATTR | KDB_TKT_FLAGS...
DoS
0
krb5_read_tkt_policy(krb5_context context, krb5_ldap_context *ldap_context, krb5_db_entry *entries, char *policy) { krb5_error_code st=0; int mask=0, omask=0; int tkt_mask=(KDB_MAX_LIFE_ATTR | KDB_MAX_RLIFE_ATTR | KDB_TKT_FLAGS...
@@ -406,14 +406,14 @@ krb5_encode_krbsecretkey(krb5_key_data *key_data_in, int n_key_data, int num_versions = 1; int i, j, last; krb5_error_code err = 0; - krb5_key_data *key_data; + krb5_key_data *key_data = NULL; - if (n_key_data <= 0) + if (n_key_data < 0) return NULL; /*...
null
null
null
28,954
process_db_args(krb5_context context, char **db_args, xargs_t *xargs, OPERATION optype) { int i=0; krb5_error_code st=0; char *arg=NULL, *arg_val=NULL; char **dptr=NULL; unsigned int arg_val_len=0; if (db_args) {...
DoS
0
process_db_args(krb5_context context, char **db_args, xargs_t *xargs, OPERATION optype) { int i=0; krb5_error_code st=0; char *arg=NULL, *arg_val=NULL; char **dptr=NULL; unsigned int arg_val_len=0; if (db_args) {...
@@ -406,14 +406,14 @@ krb5_encode_krbsecretkey(krb5_key_data *key_data_in, int n_key_data, int num_versions = 1; int i, j, last; krb5_error_code err = 0; - krb5_key_data *key_data; + krb5_key_data *key_data = NULL; - if (n_key_data <= 0) + if (n_key_data < 0) return NULL; /*...
null
null
null
28,955
add_policy_mods(krb5_context context, LDAPMod ***mods, osa_policy_ent_t policy, int op) { krb5_error_code st; char *strval[2] = { NULL }; st = krb5_add_int_mem_ldap_mod(mods, "krbmaxpwdlife", op, (int)policy->pw_max_life); if (st) return st; ...
DoS
0
add_policy_mods(krb5_context context, LDAPMod ***mods, osa_policy_ent_t policy, int op) { krb5_error_code st; char *strval[2] = { NULL }; st = krb5_add_int_mem_ldap_mod(mods, "krbmaxpwdlife", op, (int)policy->pw_max_life); if (st) return st; ...
@@ -314,10 +314,11 @@ krb5_ldap_get_password_policy_from_dn(krb5_context context, char *pol_name, LDAP_SEARCH(pol_dn, LDAP_SCOPE_BASE, "(objectclass=krbPwdPolicy)", password_policy_attributes); ent=ldap_first_entry(ld, result); - if (ent != NULL) { - if ((st = populate_policy(context, ld, ent, pol...
null
null
null
28,956
get_ui4(LDAP *ld, LDAPMessage *ent, char *name, krb5_ui_4 *out) { int val; krb5_ldap_get_value(ld, ent, name, &val); *out = val; }
DoS
0
get_ui4(LDAP *ld, LDAPMessage *ent, char *name, krb5_ui_4 *out) { int val; krb5_ldap_get_value(ld, ent, name, &val); *out = val; }
@@ -314,10 +314,11 @@ krb5_ldap_get_password_policy_from_dn(krb5_context context, char *pol_name, LDAP_SEARCH(pol_dn, LDAP_SCOPE_BASE, "(objectclass=krbPwdPolicy)", password_policy_attributes); ent=ldap_first_entry(ld, result); - if (ent != NULL) { - if ((st = populate_policy(context, ld, ent, pol...
null
null
null
28,957
krb5_ldap_create_password_policy(krb5_context context, osa_policy_ent_t policy) { krb5_error_code st=0; LDAP *ld=NULL; LDAPMod **mods={NULL}; kdb5_dal_handle *dal_handle=NULL; krb5_ldap_context *ldap_context=NULL; krb5_...
DoS
0
krb5_ldap_create_password_policy(krb5_context context, osa_policy_ent_t policy) { krb5_error_code st=0; LDAP *ld=NULL; LDAPMod **mods={NULL}; kdb5_dal_handle *dal_handle=NULL; krb5_ldap_context *ldap_context=NULL; krb5_...
@@ -314,10 +314,11 @@ krb5_ldap_get_password_policy_from_dn(krb5_context context, char *pol_name, LDAP_SEARCH(pol_dn, LDAP_SCOPE_BASE, "(objectclass=krbPwdPolicy)", password_policy_attributes); ent=ldap_first_entry(ld, result); - if (ent != NULL) { - if ((st = populate_policy(context, ld, ent, pol...
null
null
null
28,958
krb5_ldap_delete_password_policy(krb5_context context, char *policy) { int mask = 0; char *policy_dn = NULL, *class[] = {"krbpwdpolicy", NULL}; krb5_error_code st=0; LDAP *ld=NULL; kdb5_dal_handle *dal_hand...
DoS
0
krb5_ldap_delete_password_policy(krb5_context context, char *policy) { int mask = 0; char *policy_dn = NULL, *class[] = {"krbpwdpolicy", NULL}; krb5_error_code st=0; LDAP *ld=NULL; kdb5_dal_handle *dal_hand...
@@ -314,10 +314,11 @@ krb5_ldap_get_password_policy_from_dn(krb5_context context, char *pol_name, LDAP_SEARCH(pol_dn, LDAP_SCOPE_BASE, "(objectclass=krbPwdPolicy)", password_policy_attributes); ent=ldap_first_entry(ld, result); - if (ent != NULL) { - if ((st = populate_policy(context, ld, ent, pol...
null
null
null
28,959
krb5_ldap_get_password_policy(krb5_context context, char *name, osa_policy_ent_t *policy) { krb5_error_code st = 0; char *policy_dn = NULL; /* Clear the global error string */ krb5_clear_error_message(context); /* validate the input ...
DoS
0
krb5_ldap_get_password_policy(krb5_context context, char *name, osa_policy_ent_t *policy) { krb5_error_code st = 0; char *policy_dn = NULL; /* Clear the global error string */ krb5_clear_error_message(context); /* validate the input ...
@@ -314,10 +314,11 @@ krb5_ldap_get_password_policy_from_dn(krb5_context context, char *pol_name, LDAP_SEARCH(pol_dn, LDAP_SCOPE_BASE, "(objectclass=krbPwdPolicy)", password_policy_attributes); ent=ldap_first_entry(ld, result); - if (ent != NULL) { - if ((st = populate_policy(context, ld, ent, pol...
null
null
null
28,960
populate_policy(krb5_context context, LDAP *ld, LDAPMessage *ent, char *pol_name, osa_policy_ent_t pol_entry) { int st = 0; pol_entry->name = strdup(pol_name); CHECK_NULL(pol_entry->name); pol_entry->version = 1; get_ui4(ld, ent, "krb...
DoS
0
populate_policy(krb5_context context, LDAP *ld, LDAPMessage *ent, char *pol_name, osa_policy_ent_t pol_entry) { int st = 0; pol_entry->name = strdup(pol_name); CHECK_NULL(pol_entry->name); pol_entry->version = 1; get_ui4(ld, ent, "krb...
@@ -314,10 +314,11 @@ krb5_ldap_get_password_policy_from_dn(krb5_context context, char *pol_name, LDAP_SEARCH(pol_dn, LDAP_SCOPE_BASE, "(objectclass=krbPwdPolicy)", password_policy_attributes); ent=ldap_first_entry(ld, result); - if (ent != NULL) { - if ((st = populate_policy(context, ld, ent, pol...
null
null
null
28,961
apply_keysalt_policy(kadm5_server_handle_t handle, const char *policy, int n_ks_tuple, krb5_key_salt_tuple *ks_tuple, int *new_n_kstp, krb5_key_salt_tuple **new_kstp) { kadm5_ret_t ret; kadm5_policy_ent_rec polent; krb5_boolean have_polent; int ak_n_ks_tuple = 0...
null
0
apply_keysalt_policy(kadm5_server_handle_t handle, const char *policy, int n_ks_tuple, krb5_key_salt_tuple *ks_tuple, int *new_n_kstp, krb5_key_salt_tuple **new_kstp) { kadm5_ret_t ret; kadm5_policy_ent_rec polent; krb5_boolean have_polent; int ak_n_ks_tuple = 0...
@@ -344,6 +344,20 @@ check_1_6_dummy(kadm5_principal_ent_t entry, long mask, *passptr = NULL; } +/* Return the number of keys with the newest kvno. Assumes that all key data + * with the newest kvno are at the front of the key data array. */ +static int +count_new_keys(int n_key_data, krb5_key_data *key_data) ...
CWE-255
null
null
28,962
int create_history_entry(krb5_context context, krb5_keyblock *hist_key, int n_key_data, krb5_key_data *key_data, osa_pw_hist_ent *hist) { krb5_error_code ret; krb5_keyblock key; krb5_keysalt salt; int i; hist->key_data = k5calloc(n_key_data, sizeof(...
null
0
int create_history_entry(krb5_context context, krb5_keyblock *hist_key, int n_key_data, krb5_key_data *key_data, osa_pw_hist_ent *hist) { krb5_error_code ret; krb5_keyblock key; krb5_keysalt salt; int i; hist->key_data = k5calloc(n_key_data, sizeof(...
@@ -344,6 +344,20 @@ check_1_6_dummy(kadm5_principal_ent_t entry, long mask, *passptr = NULL; } +/* Return the number of keys with the newest kvno. Assumes that all key data + * with the newest kvno are at the front of the key data array. */ +static int +count_new_keys(int n_key_data, krb5_key_data *key_data) ...
CWE-255
null
null
28,963
get_policy(kadm5_server_handle_t handle, const char *name, kadm5_policy_ent_t policy_out, krb5_boolean *have_pol_out) { kadm5_ret_t ret; *have_pol_out = FALSE; if (name == NULL) return 0; ret = kadm5_get_policy(handle->lhandle, (char *)name, policy_out); if (ret == 0) *ha...
null
0
get_policy(kadm5_server_handle_t handle, const char *name, kadm5_policy_ent_t policy_out, krb5_boolean *have_pol_out) { kadm5_ret_t ret; *have_pol_out = FALSE; if (name == NULL) return 0; ret = kadm5_get_policy(handle->lhandle, (char *)name, policy_out); if (ret == 0) *ha...
@@ -344,6 +344,20 @@ check_1_6_dummy(kadm5_principal_ent_t entry, long mask, *passptr = NULL; } +/* Return the number of keys with the newest kvno. Assumes that all key data + * with the newest kvno are at the front of the key data array. */ +static int +count_new_keys(int n_key_data, krb5_key_data *key_data) ...
CWE-255
null
null
28,964
kadm5_chpass_principal_3(void *server_handle, krb5_principal principal, krb5_boolean keepold, int n_ks_tuple, krb5_key_salt_tuple *ks_tuple, char *password) { krb5_int32 now; kadm5_policy_ent_rec pol; osa_prin...
null
0
kadm5_chpass_principal_3(void *server_handle, krb5_principal principal, krb5_boolean keepold, int n_ks_tuple, krb5_key_salt_tuple *ks_tuple, char *password) { krb5_int32 now; kadm5_policy_ent_rec pol; osa_prin...
@@ -344,6 +344,20 @@ check_1_6_dummy(kadm5_principal_ent_t entry, long mask, *passptr = NULL; } +/* Return the number of keys with the newest kvno. Assumes that all key data + * with the newest kvno are at the front of the key data array. */ +static int +count_new_keys(int n_key_data, krb5_key_data *key_data) ...
CWE-255
null
null
28,965
kadm5_create_principal(void *server_handle, kadm5_principal_ent_t entry, long mask, char *password) { return kadm5_create_principal_3(server_handle, entry, mask, 0, NULL, password); }
null
0
kadm5_create_principal(void *server_handle, kadm5_principal_ent_t entry, long mask, char *password) { return kadm5_create_principal_3(server_handle, entry, mask, 0, NULL, password); }
@@ -344,6 +344,20 @@ check_1_6_dummy(kadm5_principal_ent_t entry, long mask, *passptr = NULL; } +/* Return the number of keys with the newest kvno. Assumes that all key data + * with the newest kvno are at the front of the key data array. */ +static int +count_new_keys(int n_key_data, krb5_key_data *key_data) ...
CWE-255
null
null
28,966
kadm5_create_principal_3(void *server_handle, kadm5_principal_ent_t entry, long mask, int n_ks_tuple, krb5_key_salt_tuple *ks_tuple, char *password) { krb5_db_entry *kdb; osa_princ_ent_rec adb; kadm5_policy_en...
null
0
kadm5_create_principal_3(void *server_handle, kadm5_principal_ent_t entry, long mask, int n_ks_tuple, krb5_key_salt_tuple *ks_tuple, char *password) { krb5_db_entry *kdb; osa_princ_ent_rec adb; kadm5_policy_en...
@@ -344,6 +344,20 @@ check_1_6_dummy(kadm5_principal_ent_t entry, long mask, *passptr = NULL; } +/* Return the number of keys with the newest kvno. Assumes that all key data + * with the newest kvno are at the front of the key data array. */ +static int +count_new_keys(int n_key_data, krb5_key_data *key_data) ...
CWE-255
null
null
28,967
kadm5_delete_principal(void *server_handle, krb5_principal principal) { unsigned int ret; krb5_db_entry *kdb; osa_princ_ent_rec adb; kadm5_server_handle_t handle = server_handle; CHECK_HANDLE(server_handle); krb5_clear_error_message(handle->context); ...
null
0
kadm5_delete_principal(void *server_handle, krb5_principal principal) { unsigned int ret; krb5_db_entry *kdb; osa_princ_ent_rec adb; kadm5_server_handle_t handle = server_handle; CHECK_HANDLE(server_handle); krb5_clear_error_message(handle->context); ...
@@ -344,6 +344,20 @@ check_1_6_dummy(kadm5_principal_ent_t entry, long mask, *passptr = NULL; } +/* Return the number of keys with the newest kvno. Assumes that all key data + * with the newest kvno are at the front of the key data array. */ +static int +count_new_keys(int n_key_data, krb5_key_data *key_data) ...
CWE-255
null
null
28,968
kadm5_get_principal(void *server_handle, krb5_principal principal, kadm5_principal_ent_t entry, long in_mask) { krb5_db_entry *kdb; osa_princ_ent_rec adb; krb5_error_code ret = 0; long mask; int i; ...
null
0
kadm5_get_principal(void *server_handle, krb5_principal principal, kadm5_principal_ent_t entry, long in_mask) { krb5_db_entry *kdb; osa_princ_ent_rec adb; krb5_error_code ret = 0; long mask; int i; ...
@@ -344,6 +344,20 @@ check_1_6_dummy(kadm5_principal_ent_t entry, long mask, *passptr = NULL; } +/* Return the number of keys with the newest kvno. Assumes that all key data + * with the newest kvno are at the front of the key data array. */ +static int +count_new_keys(int n_key_data, krb5_key_data *key_data) ...
CWE-255
null
null
28,969
kadm5_modify_principal(void *server_handle, kadm5_principal_ent_t entry, long mask) { int ret, ret2, i; kadm5_policy_ent_rec pol; krb5_boolean have_pol = FALSE; krb5_db_entry *kdb; krb5_tl_data *tl_data_orig; osa_princ...
null
0
kadm5_modify_principal(void *server_handle, kadm5_principal_ent_t entry, long mask) { int ret, ret2, i; kadm5_policy_ent_rec pol; krb5_boolean have_pol = FALSE; krb5_db_entry *kdb; krb5_tl_data *tl_data_orig; osa_princ...
@@ -344,6 +344,20 @@ check_1_6_dummy(kadm5_principal_ent_t entry, long mask, *passptr = NULL; } +/* Return the number of keys with the newest kvno. Assumes that all key data + * with the newest kvno are at the front of the key data array. */ +static int +count_new_keys(int n_key_data, krb5_key_data *key_data) ...
CWE-255
null
null
28,970
kadm5_purgekeys(void *server_handle, krb5_principal principal, int keepkvno) { kadm5_server_handle_t handle = server_handle; kadm5_ret_t ret; krb5_db_entry *kdb; osa_princ_ent_rec adb; krb5_key_data *old_keydata; int n_old_keydata; int i, j, k; CHECK_HAND...
null
0
kadm5_purgekeys(void *server_handle, krb5_principal principal, int keepkvno) { kadm5_server_handle_t handle = server_handle; kadm5_ret_t ret; krb5_db_entry *kdb; osa_princ_ent_rec adb; krb5_key_data *old_keydata; int n_old_keydata; int i, j, k; CHECK_HAND...
@@ -344,6 +344,20 @@ check_1_6_dummy(kadm5_principal_ent_t entry, long mask, *passptr = NULL; } +/* Return the number of keys with the newest kvno. Assumes that all key data + * with the newest kvno are at the front of the key data array. */ +static int +count_new_keys(int n_key_data, krb5_key_data *key_data) ...
CWE-255
null
null
28,971
kadm5_setv4key_principal(void *server_handle, krb5_principal principal, krb5_keyblock *keyblock) { krb5_db_entry *kdb; osa_princ_ent_rec adb; krb5_int32 now; kadm5_policy_ent_rec pol; krb5_keysalt ...
null
0
kadm5_setv4key_principal(void *server_handle, krb5_principal principal, krb5_keyblock *keyblock) { krb5_db_entry *kdb; osa_princ_ent_rec adb; krb5_int32 now; kadm5_policy_ent_rec pol; krb5_keysalt ...
@@ -344,6 +344,20 @@ check_1_6_dummy(kadm5_principal_ent_t entry, long mask, *passptr = NULL; } +/* Return the number of keys with the newest kvno. Assumes that all key data + * with the newest kvno are at the front of the key data array. */ +static int +count_new_keys(int n_key_data, krb5_key_data *key_data) ...
CWE-255
null
null
28,972
ks_tuple_present(int n_ks_tuple, krb5_key_salt_tuple *ks_tuple, krb5_key_salt_tuple *looking_for) { int i; for (i = 0; i < n_ks_tuple; i++) { if (ks_tuple[i].ks_enctype == looking_for->ks_enctype && ks_tuple[i].ks_salttype == looking_for->ks_salttype) return TRU...
null
0
ks_tuple_present(int n_ks_tuple, krb5_key_salt_tuple *ks_tuple, krb5_key_salt_tuple *looking_for) { int i; for (i = 0; i < n_ks_tuple; i++) { if (ks_tuple[i].ks_enctype == looking_for->ks_enctype && ks_tuple[i].ks_salttype == looking_for->ks_salttype) return TRU...
@@ -344,6 +344,20 @@ check_1_6_dummy(kadm5_principal_ent_t entry, long mask, *passptr = NULL; } +/* Return the number of keys with the newest kvno. Assumes that all key data + * with the newest kvno are at the front of the key data array. */ +static int +count_new_keys(int n_key_data, krb5_key_data *key_data) ...
CWE-255
null
null
28,973
make_ks_from_keys(krb5_context context, int n_keys, krb5_keyblock *keyblocks, krb5_key_salt_tuple **ks_tuple) { int i; *ks_tuple = calloc(n_keys, sizeof(**ks_tuple)); if (*ks_tuple == NULL) return ENOMEM; for (i = 0; i < n_keys; i++) { (*ks_tuple)[i].ks_enctype = keyb...
null
0
make_ks_from_keys(krb5_context context, int n_keys, krb5_keyblock *keyblocks, krb5_key_salt_tuple **ks_tuple) { int i; *ks_tuple = calloc(n_keys, sizeof(**ks_tuple)); if (*ks_tuple == NULL) return ENOMEM; for (i = 0; i < n_keys; i++) { (*ks_tuple)[i].ks_enctype = keyb...
@@ -344,6 +344,20 @@ check_1_6_dummy(kadm5_principal_ent_t entry, long mask, *passptr = NULL; } +/* Return the number of keys with the newest kvno. Assumes that all key data + * with the newest kvno are at the front of the key data array. */ +static int +count_new_keys(int n_key_data, krb5_key_data *key_data) ...
CWE-255
null
null
28,974
int mk_handler_read(int socket, struct client_session *cs) { int bytes; int max_read; int available = 0; int new_size; int total_bytes = 0; char *tmp = 0; MK_TRACE("MAX REQUEST SIZE: %i", config->max_request_size); try_pending: available = cs->body_size - cs->body_length; if (ava...
DoS
0
int mk_handler_read(int socket, struct client_session *cs) { int bytes; int max_read; int available = 0; int new_size; int total_bytes = 0; char *tmp = 0; MK_TRACE("MAX REQUEST SIZE: %i", config->max_request_size); try_pending: available = cs->body_size - cs->body_length; if (ava...
@@ -99,7 +99,12 @@ static inline void mk_request_init(struct session_request *request) void mk_request_free(struct session_request *sr) { if (sr->fd_file > 0) { - mk_vhost_close(sr); + if (sr->fd_is_fdt == MK_TRUE) { + mk_vhost_close(sr); + } + else { + close(sr-...
CWE-20
null
null
28,975
int mk_handler_write(int socket, struct client_session *cs) { int final_status = 0; struct session_request *sr_node; struct mk_list *sr_list; if (mk_list_is_empty(&cs->request_list) == 0) { if (mk_request_parse(cs) != 0) { return -1; } } sr_list = &cs->request_list;...
DoS
0
int mk_handler_write(int socket, struct client_session *cs) { int final_status = 0; struct session_request *sr_node; struct mk_list *sr_list; if (mk_list_is_empty(&cs->request_list) == 0) { if (mk_request_parse(cs) != 0) { return -1; } } sr_list = &cs->request_list;...
@@ -99,7 +99,12 @@ static inline void mk_request_init(struct session_request *request) void mk_request_free(struct session_request *sr) { if (sr->fd_file > 0) { - mk_vhost_close(sr); + if (sr->fd_is_fdt == MK_TRUE) { + mk_vhost_close(sr); + } + else { + close(sr-...
CWE-20
null
null
28,976
void mk_request_free_list(struct client_session *cs) { struct session_request *sr_node; struct mk_list *sr_head, *temp; /* sr = last node */ MK_TRACE("[FD %i] Free struct client_session", cs->socket); mk_list_foreach_safe(sr_head, temp, &cs->request_list) { sr_node = mk_list_entry(sr_head,...
DoS
0
void mk_request_free_list(struct client_session *cs) { struct session_request *sr_node; struct mk_list *sr_head, *temp; /* sr = last node */ MK_TRACE("[FD %i] Free struct client_session", cs->socket); mk_list_foreach_safe(sr_head, temp, &cs->request_list) { sr_node = mk_list_entry(sr_head,...
@@ -99,7 +99,12 @@ static inline void mk_request_init(struct session_request *request) void mk_request_free(struct session_request *sr) { if (sr->fd_file > 0) { - mk_vhost_close(sr); + if (sr->fd_is_fdt == MK_TRUE) { + mk_vhost_close(sr); + } + else { + close(sr-...
CWE-20
null
null
28,977
mk_ptr_t mk_request_header_get(struct headers_toc *toc, const char *key_name, int key_len) { int i; struct header_toc_row *row; mk_ptr_t var; var.data = NULL; var.len = 0; row = toc->rows; for (i = 0; i < toc->length; i++) { /* * status = 1 means that the toc entry was al...
DoS
0
mk_ptr_t mk_request_header_get(struct headers_toc *toc, const char *key_name, int key_len) { int i; struct header_toc_row *row; mk_ptr_t var; var.data = NULL; var.len = 0; row = toc->rows; for (i = 0; i < toc->length; i++) { /* * status = 1 means that the toc entry was al...
@@ -99,7 +99,12 @@ static inline void mk_request_init(struct session_request *request) void mk_request_free(struct session_request *sr) { if (sr->fd_file > 0) { - mk_vhost_close(sr); + if (sr->fd_is_fdt == MK_TRUE) { + mk_vhost_close(sr); + } + else { + close(sr-...
CWE-20
null
null
28,978
int mk_request_header_toc_parse(struct headers_toc *toc, const char *data, int len) { int i = 0; int header_len; int colon; char *q; char *p = (char *) data; char *l = p; toc->length = 0; for (i = 0; l < (data + len) && p && i < MK_HEADERS_TOC_LEN; i++) { if (*p == '\r') goto o...
DoS
0
int mk_request_header_toc_parse(struct headers_toc *toc, const char *data, int len) { int i = 0; int header_len; int colon; char *q; char *p = (char *) data; char *l = p; toc->length = 0; for (i = 0; l < (data + len) && p && i < MK_HEADERS_TOC_LEN; i++) { if (*p == '\r') goto o...
@@ -99,7 +99,12 @@ static inline void mk_request_init(struct session_request *request) void mk_request_free(struct session_request *sr) { if (sr->fd_file > 0) { - mk_vhost_close(sr); + if (sr->fd_is_fdt == MK_TRUE) { + mk_vhost_close(sr); + } + else { + close(sr-...
CWE-20
null
null
28,979
mk_ptr_t mk_request_index(char *pathfile, char *file_aux, const unsigned int flen) { unsigned long len; mk_ptr_t f; struct mk_string_line *entry; struct mk_list *head; mk_ptr_reset(&f); if (!config->index_files) return f; mk_list_foreach(head, config->index_files) { entry = mk_list...
DoS
0
mk_ptr_t mk_request_index(char *pathfile, char *file_aux, const unsigned int flen) { unsigned long len; mk_ptr_t f; struct mk_string_line *entry; struct mk_list *head; mk_ptr_reset(&f); if (!config->index_files) return f; mk_list_foreach(head, config->index_files) { entry = mk_list...
@@ -99,7 +99,12 @@ static inline void mk_request_init(struct session_request *request) void mk_request_free(struct session_request *sr) { if (sr->fd_file > 0) { - mk_vhost_close(sr); + if (sr->fd_is_fdt == MK_TRUE) { + mk_vhost_close(sr); + } + else { + close(sr-...
CWE-20
null
null
28,980
static inline void mk_request_init(struct session_request *request) { request->status = MK_TRUE; request->method = MK_HTTP_METHOD_UNKNOWN; request->file_info.size = -1; request->bytes_to_send = -1; request->fd_file = -1; /* Response Headers */ mk_header_response_reset(&request->headers); ...
DoS
0
static inline void mk_request_init(struct session_request *request) { request->status = MK_TRUE; request->method = MK_HTTP_METHOD_UNKNOWN; request->file_info.size = -1; request->bytes_to_send = -1; request->fd_file = -1; /* Response Headers */ mk_header_response_reset(&request->headers); ...
@@ -99,7 +99,12 @@ static inline void mk_request_init(struct session_request *request) void mk_request_free(struct session_request *sr) { if (sr->fd_file > 0) { - mk_vhost_close(sr); + if (sr->fd_is_fdt == MK_TRUE) { + mk_vhost_close(sr); + } + else { + close(sr-...
CWE-20
null
null
28,981
void mk_request_ka_next(struct client_session *cs) { cs->first_method = -1; cs->body_pos_end = -1; cs->body_length = 0; cs->counter_connections++; /* Update data for scheduler */ cs->init_time = log_current_utime; cs->status = MK_REQUEST_STATUS_INCOMPLETE; mk_list_add(&cs->request_incom...
DoS
0
void mk_request_ka_next(struct client_session *cs) { cs->first_method = -1; cs->body_pos_end = -1; cs->body_length = 0; cs->counter_connections++; /* Update data for scheduler */ cs->init_time = log_current_utime; cs->status = MK_REQUEST_STATUS_INCOMPLETE; mk_list_add(&cs->request_incom...
@@ -99,7 +99,12 @@ static inline void mk_request_init(struct session_request *request) void mk_request_free(struct session_request *sr) { if (sr->fd_file > 0) { - mk_vhost_close(sr); + if (sr->fd_is_fdt == MK_TRUE) { + mk_vhost_close(sr); + } + else { + close(sr-...
CWE-20
null
null
28,982
static int mk_request_process(struct client_session *cs, struct session_request *sr) { int status = 0; int socket = cs->socket; struct mk_list *hosts = &config->hosts; struct mk_list *alias; /* Always assign the first node 'default vhost' */ sr->host_conf = mk_list_entry_first(hosts, struct hos...
DoS
0
static int mk_request_process(struct client_session *cs, struct session_request *sr) { int status = 0; int socket = cs->socket; struct mk_list *hosts = &config->hosts; struct mk_list *alias; /* Always assign the first node 'default vhost' */ sr->host_conf = mk_list_entry_first(hosts, struct hos...
@@ -99,7 +99,12 @@ static inline void mk_request_init(struct session_request *request) void mk_request_free(struct session_request *sr) { if (sr->fd_file > 0) { - mk_vhost_close(sr); + if (sr->fd_is_fdt == MK_TRUE) { + mk_vhost_close(sr); + } + else { + close(sr-...
CWE-20
null
null
28,983
static mk_ptr_t *mk_request_set_default_page(char *title, mk_ptr_t message, char *signature) { char *temp; mk_ptr_t *p; p = mk_mem_malloc(sizeof(mk_ptr_t)); p->data = NULL; temp = mk_ptr_to_buf(message); mk_string_build(&p->data, &p->len, ...
DoS
0
static mk_ptr_t *mk_request_set_default_page(char *title, mk_ptr_t message, char *signature) { char *temp; mk_ptr_t *p; p = mk_mem_malloc(sizeof(mk_ptr_t)); p->data = NULL; temp = mk_ptr_to_buf(message); mk_string_build(&p->data, &p->len, ...
@@ -99,7 +99,12 @@ static inline void mk_request_init(struct session_request *request) void mk_request_free(struct session_request *sr) { if (sr->fd_file > 0) { - mk_vhost_close(sr); + if (sr->fd_is_fdt == MK_TRUE) { + mk_vhost_close(sr); + } + else { + close(sr-...
CWE-20
null
null
28,984
struct client_session *mk_session_get(int socket) { struct client_session *cs; struct rb_node *node; node = cs_list->rb_node; while (node) { cs = container_of(node, struct client_session, _rb_head); if (socket < cs->socket) node = node->rb_left; else if (socket > cs->socket) node = nod...
DoS
0
struct client_session *mk_session_get(int socket) { struct client_session *cs; struct rb_node *node; node = cs_list->rb_node; while (node) { cs = container_of(node, struct client_session, _rb_head); if (socket < cs->socket) node = node->rb_left; else if (socket > cs->socket) node = nod...
@@ -99,7 +99,12 @@ static inline void mk_request_init(struct session_request *request) void mk_request_free(struct session_request *sr) { if (sr->fd_file > 0) { - mk_vhost_close(sr); + if (sr->fd_is_fdt == MK_TRUE) { + mk_vhost_close(sr); + } + else { + close(sr-...
CWE-20
null
null
28,985
int mk_vhost_close(struct session_request *sr) { return mk_vhost_fdt_close(sr); }
DoS
0
int mk_vhost_close(struct session_request *sr) { return mk_vhost_fdt_close(sr); }
@@ -220,6 +220,7 @@ static inline int mk_vhost_fdt_open(int id, unsigned int hash, sr->vhost_fdt_id = id; sr->vhost_fdt_hash = hash; + sr->fd_is_fdt = MK_TRUE; return fd; } @@ -262,7 +263,6 @@ static inline int mk_vhost_fdt_close(struct session_reque...
CWE-20
null
null
28,986
*mk_vhost_fdt_chain_lookup(unsigned int hash, struct vhost_fdt_hash_table *ht) { int i; struct vhost_fdt_hash_chain *hc = NULL; for (i = 0; i < VHOST_FDT_HASHTABLE_CHAINS; i++) { hc = &ht->chain[i]; if (hc->hash == hash) { return hc; } } return NULL; }
DoS
0
*mk_vhost_fdt_chain_lookup(unsigned int hash, struct vhost_fdt_hash_table *ht) { int i; struct vhost_fdt_hash_chain *hc = NULL; for (i = 0; i < VHOST_FDT_HASHTABLE_CHAINS; i++) { hc = &ht->chain[i]; if (hc->hash == hash) { return hc; } } return NULL; }
@@ -220,6 +220,7 @@ static inline int mk_vhost_fdt_open(int id, unsigned int hash, sr->vhost_fdt_id = id; sr->vhost_fdt_hash = hash; + sr->fd_is_fdt = MK_TRUE; return fd; } @@ -262,7 +263,6 @@ static inline int mk_vhost_fdt_close(struct session_reque...
CWE-20
null
null
28,987
struct vhost_fdt_hash_table *mk_vhost_fdt_table_lookup(int id, struct host *host) { struct mk_list *head; struct mk_list *vhost_list; struct vhost_fdt_host *fdt_host; struct vhost_fdt_hash_table *ht = NULL; vhost_list = mk_vhost_fdt_key; mk_list_foreach(head, vhost_list) { fdt_host = mk...
DoS
0
struct vhost_fdt_hash_table *mk_vhost_fdt_table_lookup(int id, struct host *host) { struct mk_list *head; struct mk_list *vhost_list; struct vhost_fdt_host *fdt_host; struct vhost_fdt_hash_table *ht = NULL; vhost_list = mk_vhost_fdt_key; mk_list_foreach(head, vhost_list) { fdt_host = mk...
@@ -220,6 +220,7 @@ static inline int mk_vhost_fdt_open(int id, unsigned int hash, sr->vhost_fdt_id = id; sr->vhost_fdt_hash = hash; + sr->fd_is_fdt = MK_TRUE; return fd; } @@ -262,7 +263,6 @@ static inline int mk_vhost_fdt_close(struct session_reque...
CWE-20
null
null
28,988
int mk_vhost_fdt_worker_exit() { struct mk_list *head; struct mk_list *tmp; struct vhost_fdt_host *fdt; if (config->fdt == MK_FALSE) { return -1; } mk_list_foreach_safe(head, tmp, mk_vhost_fdt_key) { fdt = mk_list_entry(head, struct vhost_fdt_host, _head); mk_list_del(&...
DoS
0
int mk_vhost_fdt_worker_exit() { struct mk_list *head; struct mk_list *tmp; struct vhost_fdt_host *fdt; if (config->fdt == MK_FALSE) { return -1; } mk_list_foreach_safe(head, tmp, mk_vhost_fdt_key) { fdt = mk_list_entry(head, struct vhost_fdt_host, _head); mk_list_del(&...
@@ -220,6 +220,7 @@ static inline int mk_vhost_fdt_open(int id, unsigned int hash, sr->vhost_fdt_id = id; sr->vhost_fdt_hash = hash; + sr->fd_is_fdt = MK_TRUE; return fd; } @@ -262,7 +263,6 @@ static inline int mk_vhost_fdt_close(struct session_reque...
CWE-20
null
null
28,989
void mk_vhost_free_all() { struct host *host; struct host_alias *host_alias; struct error_page *ep; struct mk_list *head_host; struct mk_list *head_alias; struct mk_list *head_error; struct mk_list *tmp1, *tmp2; mk_list_foreach_safe(head_host, tmp1, &config->hosts) { host = mk_l...
DoS
0
void mk_vhost_free_all() { struct host *host; struct host_alias *host_alias; struct error_page *ep; struct mk_list *head_host; struct mk_list *head_alias; struct mk_list *head_error; struct mk_list *tmp1, *tmp2; mk_list_foreach_safe(head_host, tmp1, &config->hosts) { host = mk_l...
@@ -220,6 +220,7 @@ static inline int mk_vhost_fdt_open(int id, unsigned int hash, sr->vhost_fdt_id = id; sr->vhost_fdt_hash = hash; + sr->fd_is_fdt = MK_TRUE; return fd; } @@ -262,7 +263,6 @@ static inline int mk_vhost_fdt_close(struct session_reque...
CWE-20
null
null
28,990
int mk_vhost_get(mk_ptr_t host, struct host **vhost, struct host_alias **alias) { struct host *entry_host; struct host_alias *entry_alias; struct mk_list *head_vhost, *head_alias; mk_list_foreach(head_vhost, &config->hosts) { entry_host = mk_list_entry(head_vhost, struct host, _head); m...
DoS
0
int mk_vhost_get(mk_ptr_t host, struct host **vhost, struct host_alias **alias) { struct host *entry_host; struct host_alias *entry_alias; struct mk_list *head_vhost, *head_alias; mk_list_foreach(head_vhost, &config->hosts) { entry_host = mk_list_entry(head_vhost, struct host, _head); m...
@@ -220,6 +220,7 @@ static inline int mk_vhost_fdt_open(int id, unsigned int hash, sr->vhost_fdt_id = id; sr->vhost_fdt_hash = hash; + sr->fd_is_fdt = MK_TRUE; return fd; } @@ -262,7 +263,6 @@ static inline int mk_vhost_fdt_close(struct session_reque...
CWE-20
null
null
28,991
void mk_vhost_init(char *path) { DIR *dir; unsigned long len; char *buf = 0; char *sites = 0; char *file; struct host *p_host; /* debug */ struct dirent *ent; struct file_info f_info; int ret; /* Read default virtual host file */ mk_string_build(&sites, &len, "%s/%s/", p...
DoS
0
void mk_vhost_init(char *path) { DIR *dir; unsigned long len; char *buf = 0; char *sites = 0; char *file; struct host *p_host; /* debug */ struct dirent *ent; struct file_info f_info; int ret; /* Read default virtual host file */ mk_string_build(&sites, &len, "%s/%s/", p...
@@ -220,6 +220,7 @@ static inline int mk_vhost_fdt_open(int id, unsigned int hash, sr->vhost_fdt_id = id; sr->vhost_fdt_hash = hash; + sr->fd_is_fdt = MK_TRUE; return fd; } @@ -262,7 +263,6 @@ static inline int mk_vhost_fdt_close(struct session_reque...
CWE-20
null
null
28,992
int mk_vhost_open(struct session_request *sr) { int id; int off; unsigned int hash; off = sr->host_conf->documentroot.len; hash = mk_utils_gen_hash(sr->real_path.data + off, sr->real_path.len - off); id = (hash % VHOST_FDT_HASHTABLE_SIZE); return mk_vhost_fdt...
DoS
0
int mk_vhost_open(struct session_request *sr) { int id; int off; unsigned int hash; off = sr->host_conf->documentroot.len; hash = mk_utils_gen_hash(sr->real_path.data + off, sr->real_path.len - off); id = (hash % VHOST_FDT_HASHTABLE_SIZE); return mk_vhost_fdt...
@@ -220,6 +220,7 @@ static inline int mk_vhost_fdt_open(int id, unsigned int hash, sr->vhost_fdt_id = id; sr->vhost_fdt_hash = hash; + sr->fd_is_fdt = MK_TRUE; return fd; } @@ -262,7 +263,6 @@ static inline int mk_vhost_fdt_close(struct session_reque...
CWE-20
null
null
28,993
void mk_vhost_set_single(char *path) { struct host *host; struct host_alias *halias; struct stat checkdir; unsigned long len = 0; /* Set the default host */ host = mk_mem_malloc_z(sizeof(struct host)); mk_list_init(&host->error_pages); mk_list_init(&host->server_names); /* Prepare ...
DoS
0
void mk_vhost_set_single(char *path) { struct host *host; struct host_alias *halias; struct stat checkdir; unsigned long len = 0; /* Set the default host */ host = mk_mem_malloc_z(sizeof(struct host)); mk_list_init(&host->error_pages); mk_list_init(&host->server_names); /* Prepare ...
@@ -220,6 +220,7 @@ static inline int mk_vhost_fdt_open(int id, unsigned int hash, sr->vhost_fdt_id = id; sr->vhost_fdt_hash = hash; + sr->fd_is_fdt = MK_TRUE; return fd; } @@ -262,7 +263,6 @@ static inline int mk_vhost_fdt_close(struct session_reque...
CWE-20
null
null
28,994
SYSCALL_DEFINE2(umount, char __user *, name, int, flags) { struct path path; struct mount *mnt; int retval; int lookup_flags = 0; if (flags & ~(MNT_FORCE | MNT_DETACH | MNT_EXPIRE | UMOUNT_NOFOLLOW)) return -EINVAL; if (!may_mount()) return -EPERM; if (!(flags & UMOUNT_NOFOLLOW)) lookup_flags |= LOOKUP_...
DoS +Priv
0
SYSCALL_DEFINE2(umount, char __user *, name, int, flags) { struct path path; struct mount *mnt; int retval; int lookup_flags = 0; if (flags & ~(MNT_FORCE | MNT_DETACH | MNT_EXPIRE | UMOUNT_NOFOLLOW)) return -EINVAL; if (!may_mount()) return -EPERM; if (!(flags & UMOUNT_NOFOLLOW)) lookup_flags |= LOOKUP_...
@@ -890,8 +890,21 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root, mnt->mnt.mnt_flags = old->mnt.mnt_flags & ~(MNT_WRITE_HOLD|MNT_MARKED); /* Don't allow unprivileged users to change mount flags */ - if ((flag & CL_UNPRIVILEGED) && (mnt->mnt.mnt_flags & MNT_READONLY)) - mnt->mnt.mnt_flag...
CWE-264
null
null
28,995
SYSCALL_DEFINE2(pivot_root, const char __user *, new_root, const char __user *, put_old) { struct path new, old, parent_path, root_parent, root; struct mount *new_mnt, *root_mnt, *old_mnt; struct mountpoint *old_mp, *root_mp; int error; if (!may_mount()) return -EPERM; error = user_path_dir(new_root, &new);...
DoS +Priv
0
SYSCALL_DEFINE2(pivot_root, const char __user *, new_root, const char __user *, put_old) { struct path new, old, parent_path, root_parent, root; struct mount *new_mnt, *root_mnt, *old_mnt; struct mountpoint *old_mp, *root_mp; int error; if (!may_mount()) return -EPERM; error = user_path_dir(new_root, &new);...
@@ -890,8 +890,21 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root, mnt->mnt.mnt_flags = old->mnt.mnt_flags & ~(MNT_WRITE_HOLD|MNT_MARKED); /* Don't allow unprivileged users to change mount flags */ - if ((flag & CL_UNPRIVILEGED) && (mnt->mnt.mnt_flags & MNT_READONLY)) - mnt->mnt.mnt_flag...
CWE-264
null
null
28,996
struct mount *__lookup_mnt(struct vfsmount *mnt, struct dentry *dentry) { struct hlist_head *head = m_hash(mnt, dentry); struct mount *p; hlist_for_each_entry_rcu(p, head, mnt_hash) if (&p->mnt_parent->mnt == mnt && p->mnt_mountpoint == dentry) return p; return NULL; }
DoS +Priv
0
struct mount *__lookup_mnt(struct vfsmount *mnt, struct dentry *dentry) { struct hlist_head *head = m_hash(mnt, dentry); struct mount *p; hlist_for_each_entry_rcu(p, head, mnt_hash) if (&p->mnt_parent->mnt == mnt && p->mnt_mountpoint == dentry) return p; return NULL; }
@@ -890,8 +890,21 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root, mnt->mnt.mnt_flags = old->mnt.mnt_flags & ~(MNT_WRITE_HOLD|MNT_MARKED); /* Don't allow unprivileged users to change mount flags */ - if ((flag & CL_UNPRIVILEGED) && (mnt->mnt.mnt_flags & MNT_READONLY)) - mnt->mnt.mnt_flag...
CWE-264
null
null
28,997
static struct mount *alloc_vfsmnt(const char *name) { struct mount *mnt = kmem_cache_zalloc(mnt_cache, GFP_KERNEL); if (mnt) { int err; err = mnt_alloc_id(mnt); if (err) goto out_free_cache; if (name) { mnt->mnt_devname = kstrdup(name, GFP_KERNEL); if (!mnt->mnt_devname) goto out_free_id; } ...
DoS +Priv
0
static struct mount *alloc_vfsmnt(const char *name) { struct mount *mnt = kmem_cache_zalloc(mnt_cache, GFP_KERNEL); if (mnt) { int err; err = mnt_alloc_id(mnt); if (err) goto out_free_cache; if (name) { mnt->mnt_devname = kstrdup(name, GFP_KERNEL); if (!mnt->mnt_devname) goto out_free_id; } ...
@@ -890,8 +890,21 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root, mnt->mnt.mnt_flags = old->mnt.mnt_flags & ~(MNT_WRITE_HOLD|MNT_MARKED); /* Don't allow unprivileged users to change mount flags */ - if ((flag & CL_UNPRIVILEGED) && (mnt->mnt.mnt_flags & MNT_READONLY)) - mnt->mnt.mnt_flag...
CWE-264
null
null
28,998
static void attach_mnt(struct mount *mnt, struct mount *parent, struct mountpoint *mp) { mnt_set_mountpoint(parent, mp, mnt); hlist_add_head_rcu(&mnt->mnt_hash, m_hash(&parent->mnt, mp->m_dentry)); list_add_tail(&mnt->mnt_child, &parent->mnt_mounts); }
DoS +Priv
0
static void attach_mnt(struct mount *mnt, struct mount *parent, struct mountpoint *mp) { mnt_set_mountpoint(parent, mp, mnt); hlist_add_head_rcu(&mnt->mnt_hash, m_hash(&parent->mnt, mp->m_dentry)); list_add_tail(&mnt->mnt_child, &parent->mnt_mounts); }
@@ -890,8 +890,21 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root, mnt->mnt.mnt_flags = old->mnt.mnt_flags & ~(MNT_WRITE_HOLD|MNT_MARKED); /* Don't allow unprivileged users to change mount flags */ - if ((flag & CL_UNPRIVILEGED) && (mnt->mnt.mnt_flags & MNT_READONLY)) - mnt->mnt.mnt_flag...
CWE-264
null
null
28,999
static int attach_recursive_mnt(struct mount *source_mnt, struct mount *dest_mnt, struct mountpoint *dest_mp, struct path *parent_path) { HLIST_HEAD(tree_list); struct mount *child, *p; struct hlist_node *n; int err; if (IS_MNT_SHARED(dest_mnt)) { err = invent_group_ids(source_mnt, true); if (err) ...
DoS +Priv
0
static int attach_recursive_mnt(struct mount *source_mnt, struct mount *dest_mnt, struct mountpoint *dest_mp, struct path *parent_path) { HLIST_HEAD(tree_list); struct mount *child, *p; struct hlist_node *n; int err; if (IS_MNT_SHARED(dest_mnt)) { err = invent_group_ids(source_mnt, true); if (err) ...
@@ -890,8 +890,21 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root, mnt->mnt.mnt_flags = old->mnt.mnt_flags & ~(MNT_WRITE_HOLD|MNT_MARKED); /* Don't allow unprivileged users to change mount flags */ - if ((flag & CL_UNPRIVILEGED) && (mnt->mnt.mnt_flags & MNT_READONLY)) - mnt->mnt.mnt_flag...
CWE-264
null
null